Re-Creating a Mysql.lock?

I tried to down grade my PHP5.3.x to 5.2.6 and some how I broke the connection to my Mysql. I needed to do this for version 6.xx of Drupal. Anyone know a quick fix to the mysql.lock or do I have to re-install Mysql?

Error Message:
Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (13).

It’s not a lock, it’s a sock. It means the application and mysql don’t agree on which directory the Unix socket is located. Usually caused by mysql libraries and server at different versions. You can change the socket path in /etc/my.cnf. Sorry, I can’t say which directory is correct as I don’t run into such mismatches.

There is a CLI version of this which I don’t recall exactly but check YaST>System services to determine whether mysqld is running; if it isn’t, starting it should work. If it is running, you could try turning it off and then turning it on and seeing if that works.

I did restart it and I had the File Manager open in both directories according to the my.cnf:
#password = your_password
port = 3306
socket = /var/run/mysql/mysql.sock

The MySQL server

port = 3306
socket = /var/run/mysql/mysql.sock

…and I notice the mysql.sock was being removed and created in the client path and database path… So do I make the change to point to /var/lib/mysql for Drupal and if I do, would anything else break? I’m assuming it would be ok?

Why not simply add a link to /var/run/mysql/mysql.sock? Or change the paths in Drupal? Then you won’t upset any other programs that expect it there.

Good Idea!.. Thanks I shall do that…

The links are not working for PHP5.2.6! …I created another Vbox (3.2.8) VM, install 11.3, install the Web & LAMP Server (defualt PHP3.2x), configured everything along with Drupal 7 and everything worked fine as I expect it!

But, when I installed PHP5.2.6 from the 11.1 version (which was the only way I found to get php5.2.6), I get the disconnection error:
PDOException: SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (13) in lock_may_be_available() (line 163 of /srv/www/vhosts/drupal-7.x-dev/includes/

I also post this on the Drupal site and see what this can be resolved.