ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
尝试重启mysql服务
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# systemctl status mysqld.service ● mysqld.service - SYSV: MySQL database server. Loaded: loaded (/etc/rc.d/init.d/mysqld; bad; vendor preset: disabled) Active: failed (Result: exit-code) since 二 2018-09-25 10:48:39 CST; 1min 28s ago Docs: man:systemd-sysv-generator(8) Process: 3351 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, status=1/FAILURE)
9月 25 10:48:38 deploy systemd[1]: Starting SYSV: MySQL database server.... 9月 25 10:48:39 deploy mysqld[3351]: MySQL Daemon failed to start. 9月 25 10:48:39 deploy mysqld[3351]: Starting mysqld: [FAILED] 9月 25 10:48:39 deploy systemd[1]: mysqld.service: control process exited, code=exited status=1 9月 25 10:48:39 deploy systemd[1]: Failed to start SYSV: MySQL database server.. 9月 25 10:48:39 deploy systemd[1]: Unit mysqld.service entered failed state. 9月 25 10:48:39 deploy systemd[1]: mysqld.service failed.
查看错误日志
1 2 3 4 5 6 7 8 9 10
# journalctl -xe 9月 25 10:45:47 deploy systemd[1]: mysqld.service: control process exited, code=exited status=1 9月 25 10:45:47 deploy systemd[1]: Failed to start SYSV: MySQL database server.. -- Subject: Unit mysqld.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mysqld.service has failed. -- -- The result is failed.