Skip to content

Works remotely but not locally #29

@andy-twosticks

Description

@andy-twosticks

I can connect to MySQL from a different machine, but when I try to connect on the same one I get:

irb(main):006:0> my = Mysql.connect('localhost', 'mythbackdoor', 'notactuallymypassword')
Errno::ENOENT: No such file or directory - connect(2) for /tmp/mysql.sock
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql/protocol.rb:150:in `initialize'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql/protocol.rb:150:in `new'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql/protocol.rb:150:in `block in initialize'
        from /usr/local/lib/ruby/2.4.0/timeout.rb:76:in `timeout'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql/protocol.rb:147:in `initialize'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql.rb:115:in `new'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql.rb:115:in `connect'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql.rb:50:in `new'
        from (irb):6
        from /usr/local/bin/irb:11:in `<main>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions