Answer the question
In order to leave comments, you need to log in
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
mysql_error = 2002
#2002 - The server is not responding (or the socket of the local MySQL server is incorrectly configured)
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 questionAsk a Question
731 491 924 answers to any question