stuff to buy!!

Tuesday, January 13, 2009

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib /mysql/mysql.sock' (2), mysql won't start, start up script missing

I ran into this earlier where the mysql package was installed on a CentOS 5.2 server, but mysql was not starting.

This was due to the mysql-server package not being installed.

If you are having issues starting mysql and get the following error.

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

Verify that you have the mysql-server package installed.

==
[root@dharma02 init.d]# rpm -qa mysql-server
mysql-server-5.0.45-7.el5
==

If not, then install it.

==
yum install mysql-server
==

Then start mysql and you should be good to go.

==
service mysqld start
==

Have fun!

No comments:

Buy more Stuff!!!