You are not logged in.
someone% mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2 "No such file or directory")
When this happened before, I just upgraded mysql and it worked. Now it doesn't, even after upgrading.
What can I do?
Offline
Have you done any form of basic debugging here?
Is MySQL running?
Does that socket exist?
Can you find that socket somewhere else?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Have you done any form of basic debugging here?
Is MySQL running?
Does that socket exist?
Can you find that socket somewhere else?
MySQL isn't running, the socket doesn't exist in the folder and I can't find it anywhere else. I tried the following:
find / -name mysqld.sock
ps aux | grep mysql
Last edited by кто-то (2015-08-11 02:59:29)
Offline
MySQL isn't running
You don't see this as a problem...?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
кто-то wrote:MySQL isn't running
You don't see this as a problem...?
I don't get what you are trying to say. When I try to start mysql it returns 2002, so how am I supposed to run it?
Offline
When I try to start mysql it returns 2002, so how am I supposed to run it?
You are launching the MySQL client, which is supposed to connect to a MySQL server, which is not running (but should be, hence the error).
Offline
кто-то wrote:When I try to start mysql it returns 2002, so how am I supposed to run it?
You are launching the MySQL client, which is supposed to connect to a MySQL server, which is not running (but should be, hence the error).
I see. How can I run the server on initialization?
Offline
What do you mean with initialization? Upon launching the client? Or at boot up?
Latter would be done by enabling the appropriate service file, whereas the first one involves a little more tinkering (mainly detecting when you launch the mysql client, check if the server is running, and if no, initialise it - also keep the client from crashing during the server startup, although I don't personally know what's its timeout).
Have you read the MySQL wiki?
Offline
What do you mean with initialization? Upon launching the client? Or at boot up?
Latter would be done by enabling the appropriate service file, whereas the first one involves a little more tinkering (mainly detecting when you launch the mysql client, check if the server is running, and if no, initialise it - also keep the client from crashing during the server startup, although I don't personally know what's its timeout).
Have you read the MySQL wiki?
Gotcha. Thanks
Offline