Can't connect to local MySQL server through socket.....

Moderator: crythias

Locked
thankrts
Znuny newbie
Posts: 18
Joined: 03 Oct 2012, 08:17
Znuny Version: 3.0.10
Real Name: Thankaraj R
Company: ST Pvt Ltd

Can't connect to local MySQL server through socket.....

Post by thankrts »

Hi,

I have OTRS which is setup under Ubuntu (Virtual Server). Last week we had a power shutdown in our building and we turned off all the virtual server running under VMware Esxi.

I turned on the server back today morning. One of the staff in my office informed me that he was not able to login to our internal portal. When I tried to to access the same via web interface, I got:
Error Message: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

I was able to login to the server but I couldn't find the file named mysqld.sock inside mysqld.

What should I do?

I haven't done any updates recently. Can anyone help in fixing he issue we are facing with?

Thank you!
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Can't connect to local MySQL server through socket.....

Post by jojo »

check if mysql server is running. Ask your linux people to assist
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
thankrts
Znuny newbie
Posts: 18
Joined: 03 Oct 2012, 08:17
Znuny Version: 3.0.10
Real Name: Thankaraj R
Company: ST Pvt Ltd

Re: Can't connect to local MySQL server through socket.....

Post by thankrts »

Hi Jojo,

I searched in Google and I got a solution and it worked for me. As I said earlier that I couldn't find the socket file in the location ('/var/run/mysqld/mysqld.sock'). As per the site I followed the steps:

1. To find all the sockets in the system, I ran sudo find / -type s
2. I found the socket file in the different path (/var/lib/mysql/mysql.sock)
3. I edited the file /etc/mysql/my.cnf and changed the path to the socket file.

That's it. This worked. :D

Thank you!
Locked