Last Updated: February 25, 2016
·
1.742K
· rshetty

Check the Socket MySQL is running On

In Rails Development, you will need to specify the socket the MySQL Server is running on in the config/database.yml file.

You can get the socket as

$ mysqladmin variables | grep socket

You will get output something like this

| socket | /tmp/mysql.sock

/tmp/mysql.sock is the socket your mysql is running on.

So include that path in your database.yml config file.