# service mysqld start
Timeout error occurred trying to start MySQL Daemon.
启动 MySQL: [失败]
# mysqladmin status
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
错误日志:
Oct 14 10:55:51 localhost kernel: audit(1287024951.254:0): avc: denied { getattr } for pid=3211 exe=/usr/libexec/mysqld path=/var/lib/mysql/localhost.localdomain.err dev=sdb5 ino=113054 scontext=root:system_r:mysqld_t tcontext=root:object_r:var_lib_t tclass=file
Timeout error occurred trying to start MySQL Daemon.
启动 MySQL: [失败]
# mysqladmin status
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
错误日志:
Oct 14 10:55:51 localhost kernel: audit(1287024951.254:0): avc: denied { getattr } for pid=3211 exe=/usr/libexec/mysqld path=/var/lib/mysql/localhost.localdomain.err dev=sdb5 ino=113054 scontext=root:system_r:mysqld_t tcontext=root:object_r:var_lib_t tclass=file
本文记录了一次MySQL服务启动失败的故障排查过程,主要错误为尝试启动MySQL守护进程时超时,连接本地MySQL服务器失败,提示无法通过'/var/lib/mysql/mysql.sock'套接字连接到服务器。检查mysqld是否正在运行及该套接字文件是否存在。
740

被折叠的 条评论
为什么被折叠?



