I'm running MySql on Mac OSX. When entering SQL commands in the terminal I get the following error:
Cannot connect to mysql.sock in /tmp
I've checked and this file doesn't exist. What the heck happened to it and how do I replace/re-route it?
The most common cause of this problem is that the mysqld is not running. Check if it's running. (and don't say "ofcourse it's running, I'm not an idiot")
Second, where mysqld puts this file, and indeed, where mysql looks for the file, can be configured in my.ini.
Check the mysql manual http://www.mysql.com/doc/O/p/Option_files.html