T
T
tuxx2013-11-14 12:30:02
MySQL
tuxx, 2013-11-14 12:30:02

MySQL won't start. ERROR 2002 (HY000): Can't connect?

In ubuntu 13.10 mysql worked fine for a while, but one day the rails server didn't come up because of an error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Initially, I was guilty of accidentally resetting the project settings in ROR, but tried to log into the console and got the same error. I rummaged through a bunch of links on this problem in Google (stackoverflow, linux, various programmers, ....). I did a lot:
- completely reinstalled mysql
- registered the socket in /etc/my.cnf, but then it turned out that the settings are in /etc/mysql/my.cnf. and registered there
- looked at busy ports and sockets, but they were not busy with any other programs and services
- tried to create a socket file in the console and changed the rights of the folder and files in the folder with the socket
- tried to change the location of the socket file
I did something else, but I can't remember what.
I've just started learning about Linux. I've been dealing with this problem for more than a day now. Has anyone else experienced this and knows other ways to solve it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
strib, 2013-11-14
@strib

mysql is the client that connects to the server. is mysqld running at all? ps -ef | grep mysqld - check.

L
luckyredhot, 2013-11-14
@luckyredhot

Check the server error log. He most likely fell.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question