This has to do with the location of your /var/lib/mysql/mysql.sock or the permission of that file and it's directory. I once had a similar problem after mixing/replacing source-built MySQL installations with RPM package based installation. My permission for /var/lib/mysql did not allow access, as such the mysql.sock file was not available.
The cause for your problem could be something else, but it's worth checking those permissions.
Last edited by Tinkster; 10-30-2010 at 04:07 PM.