One solution that worked (WITHOUT reinstalling everything)
Posted by:
Meta Stable ()
Date: February 19, 2008 09:16AM
I had an earlier version of MySQL in another directory (as part of a lampp install that I had done earlier), and noticed that it had a mysql.sock file in the /opt/lampp/var/mysql directory.
I moved this file to my new/fresh installation directory (/var/lib/mysql). Didn't even have to restart the server - I just hit "mysql" on the command line, and I found that it now connected fine.
About time too... just as I was getting ready to reinstall everything..