You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>'
The text was updated successfully, but these errors were encountered:
The issue is possibly due to hardcoded location of the socket file (a server issue, not a problem with the connector.)
A workaround could be using '127.0.0.1' instead of 'localhost'.
I can connect to MySQL from a different machine, but when I try to connect on the same one I get:
The text was updated successfully, but these errors were encountered: