Mysql error on Centos 5

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
saikrishnapogu
Posts: 1
Joined: 2012/07/18 14:53:05

Mysql error on Centos 5

Post by saikrishnapogu » 2012/07/18 15:19:12

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...........

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Mysql error on Centos 5

Post by gerald_clark » 2012/07/18 15:32:02

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?

ericmacmini
Posts: 1
Joined: 2012/08/05 06:39:36

Re: Mysql error on Centos 5

Post by ericmacmini » 2012/08/05 06:44:56

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.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Mysql error on Centos 5

Post by gerald_clark » 2012/08/06 13:47:33

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.

noobnewbie
Posts: 1
Joined: 2014/02/26 04:44:09

Re: Mysql error on Centos 5

Post by noobnewbie » 2014/02/26 06:17:02

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.

User avatar
TrevorH
Forum Moderator
Posts: 27138
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Mysql error on Centos 5

Post by TrevorH » 2014/02/26 08:11:59

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.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 5 - Server Support”