When running rake db:migrate, I get this error:
Mysql2::Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I've looked at other people's questions on here and none of their solutions have helped me, for example:
Solution One
mysql.server start
returns:
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/something.pid).
Solution Two
mysqladmin variables | grep socket
returns:
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
Further notes: I tried reinstalling mysql using homebrew, which was successful, and I'm still receiving the same errors:
Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!ps aux|grep mysqltopand type-othenvsizewhich will sort by memory consumption and MySQL if running will be near top as it consumes quite a bit of memory compared to other system processes.