mysql ERROR 2002 (HY000):

I use OpenSuse 11.1_X86. I’ve installed mysql-5.0.67-12.11. Now if I want to connect with the database, there is this error >:(
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
On other OS like Ubuntu 8,10 I haven’t any problems with the mysql-database. Could somebody help me, please?
I’ve also installed libmysqlclient15, mysqlclient and php5-dbase.

Have you started the mysql server?

YaST>System>System services

Unlike Ubuntu, openSUSE does not assume that everyone will be running mysql

More aptly, SuSE does not automatically activate services that may or may not be a security consideration for your system - such as MySQL (Especially if combined with such tools as phpMyAdmin et al.)

One cause of that can be incorrect permissions, check that the /var/lib/mysql directory is owned by both the user AND group mysql

It can be set using:

kdesu chown -R mysql:mysql /var/lib/mysql

Also check that the mysql service is enabled as mentioned and that it really is mysql 5.0 you have installed and not mysql 5.1

Having installed 5.1 is also something that can throw up that error in tools like phpmyadmin because it uses a different socket path

Thank you. The mysql-service was off. Now it works very well.rotfl!