Page 1 of 1

Mysql error on Centos 5

Posted: 2012/07/18 15:19:12
by saikrishnapogu
Hi Friends,
i installed mysql on centos ,problem is iam unable to start service....while starting i am getting [failed] message...
and also i am getting below message..
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


how to resolve this issue...its my urgent ticket to resolve...pls help help me out..

and one more thing why we get this error.....i tried all the ways...i am unable to find mysql.sock in /usrl/lib/mysql...........

Mysql error on Centos 5

Posted: 2012/07/18 15:32:02
by gerald_clark
Welcome to CentOS.
New members need to read:
http://www.centos.org/modules/newbb/viewforum.php?forum=47

Mysql.sock only exists while the server is running.
How are you starting mysql?
Did you read /var/log/mysqld.log?

Re: Mysql error on Centos 5

Posted: 2012/08/05 06:44:56
by ericmacmini
Problaby SELinux is enabled en blocks writing of the sock file. You can check with:

[code]
[root@localhost ~]# sestatus
[/code]

If SELinux is enabled, it's your bottleneck.

Re: Mysql error on Centos 5

Posted: 2012/08/06 13:47:33
by gerald_clark
MySQL server runs out of the box, so selinux is not the problem.
Is sounds more like mysql-server was not installed or service mysqld was not started.
Since the OP never bothered to respond to my questions I lost interest.

Re: Mysql error on Centos 5

Posted: 2014/02/26 06:17:02
by noobnewbie
Hello there. I am a newbie facing the same problem. I have already check the 'sestatus'.

Apparently, SELinux status is enabled. So if it's because of the bottleneck.. can anyone please help me on how to solve this?

Thank you.

Re: Mysql error on Centos 5

Posted: 2014/02/26 08:11:59
by TrevorH
Look at the end of /var/log/mysqld.log for errors. Post them here if you cannot understand them and what to do to fix them.