If you get some variation of the error below:
error: ‘Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’
You need to recreate the MySQL socket symlink in /tmp:
ln -s /var/lib/mysql/mysql.sock /tmp/
If you have magically disappearing mysql.sock file, it could point to a memory issue or disk space issue on the /tmp partition.