Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed OpenSuse11.1 and tried configuring mysql with it however after installation I was not even able to start it off

I got the following error

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

As suggested in one of the forums I enabled the skip-networking option in /etc/my.cnf which did not help

I also tried binding it to the address using bind-address = in the same /etc/my.cnf

share|improve this question

I solved the problem. A after following the above steps I need to run rcmysql wwhich would configure it automatically.

share|improve this answer

1) Check:


for errors

2) Check if /var partition is not full

share|improve this answer
The log files do not exist and my var folder is under root so its not full again – manugupt1 Nov 15 '09 at 13:08

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Check mysql.sock file is available or not it will be stored in following path /var/run/mysqld/mysqld.sock If mysql.sock file missing create mysql.sock and change ownership to mysql:msql to that file.Generally mysql.sock will create automatically when mysql server restart. If not create it.

The above procedure is for ubuntu in opensuse check where the mysql.sock file is stored and follow above that i mentioned.

share|improve this answer
@masegaloeh The same error happend to me once and i fixed itby following create mysqld.sock check this [link] ( – user3585106 Feb 11 '15 at 8:46
You don't need create mysqld.sock, of course you still create the directory where the socket reside i.e mkdir /var/run/mysql. – masegaloeh Feb 11 '15 at 9:17
@masegaloeh whatever but the solutions works anyway thank's for letting me know. – user3585106 Feb 11 '15 at 9:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.