Last night my MySQL server crashed unexpectedly. When you try to reboot (with service mysql restart - I'm root), it just hangs. With the mysql -u root -p command, I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) . Then I tried to start the daemon manually ( mysqld ). The request will hang for about 2 seconds and then return. Upon closer inspection of the error logs, I got:
2016-01-22T19:18:32.399584Z 0 [ERROR] Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.
2016-01-22T19:18:32.399622Z 0 [ERROR] Unable to setup unix socket lock file.
2016-01-22T19:18:32.399646Z 0 [ERROR] Aborting
Then I tried chown mysql /var/run/mysqld , chmod -R 775 /var/run/mysqld and apt-get install mysql-community-server --reinstall . Bad luck.
I looked around and could not find a solution. Any help here?
Note. I am running Debian 8 (Jessie) with the MySQL Server 5.7.10 community
mysql debian sockets
Samboycode
source share