I had MySQL3.23.58 version pre-installed on my Linux machine. Since I'm new to both Linux and MySQL, testing around with it, I accidently deleted mysql.sock
After endless tries, I installed MySQL4.0.20 thinking the mysql.sock file would reappear, and it hasn't.
The error comes up: "Can't connect to local MySQL server through socket /var/lib/mysql/
The new version of MySQL is looking for the same file under : /tmp/mysql/
Is there a way to recreate mysql.sock??? HELP!!!!!!!!
mysql.sock is a temporary file created when the mysql server is started.
Your first step is to stop and restart your mysql server.
The next step is to try connecting again and see if that works. If it does not, you may need to specify the location of the mysql.sock file in the configuration of the application you are connecting with. (eg, my.cnf or php.ini...).