D
D
dake12312016-09-26 17:34:18
linux
dake1231, 2016-09-26 17:34:18

How to fix MySQL error: No such file or directory?

Hello! I did not understand what happened but the site stopped working. Writes Could not connect to the DB server: host = localhost, user = user, mysql_error = 2002, mysql_errno = No such file or directory. Restarting mysql says: sh: 0: getcwd() failed: No such file or directory
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. How can this be fixed? It is needed very urgently. Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Smithson, 2016-09-26
@Smithson

mysql_error = 2002

This is
#2002 - The server is not responding (or the socket of the local MySQL server is incorrectly configured)

See the /etc/my.cfg file for what's in the socket line.
Try restarting mysqld on the server.

A
aol-nnov, 2016-09-26
@aol-nnov

if you connect via a unix domain socket, check if you specified the path to it correctly.
but judging by "I restart mysql it says: sh: 0: getcwd() failed: No such file or directory", you have much bigger problems ...
start with whether you have a working hard drive at all, or have already thrown back your hooves.
then if the muscle config rules, I'm not a special expert in it, but if there is a path to the data directory, see if it is correct. and so on.
I bet that the fs is broken and the next reboot for the server is the last one :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question