MySQL Can't Connect To Local MySQL Server Through Socket '/var/run/mysqld/mysqld.sock'

Posted By Weston Ganger

I was getting the following error with mysql and my rails app.

To fix it we just create a symlink.

# ~/.profile - Add this line to the end
ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

Related External Links:

Article Topic:Software Development - Linux

Date:October 25, 2015