ERROR 2002 (HY000): Can't connect to local MysqL server through socket '/var/run/MysqLd/MysqLd.sock' (111)
130314 12:36:16 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/MysqLd: Table 'plugin' is read only
130314 12:36:16 [ERROR] Can't open the MysqL.plugin table. Please run MysqL_upgrade to create it.
130314 12:36:16 InnoDB: Initializing buffer pool,size = 8.0M
130314 12:36:16 InnoDB: Completed initialization of buffer pool
130314 12:36:16 InnoDB: Started; log sequence number 13 1336891001
130314 12:36:16 [ERROR] /usr/sbin/MysqLd: Can't create/write to file '/var/lib/MysqL/live.pid' (Errcode: 13)
130314 12:36:16 [ERROR] Can't start server: can't create PID file: Permission denied
最佳答案
我有MysqL的示例问题.我在root权限下运行但不知道为什么会发生此错误.问题是MysqL用户没有权限在/ var / run / MysqLd中创建pid文件.
完整日志可能如下所示:
原文链接:https://www.f2er.com/mysql/434010.html完整日志可能如下所示:
140812 09:35:53 MysqLd_safe Starting MysqLd daemon with databases from /var/lib/MysqL
140812 9:35:53 InnoDB: Initializing buffer pool,size = 8.0M
140812 9:35:53 InnoDB: Completed initialization of buffer pool
140812 9:35:53 InnoDB: Started; log sequence number 0 197396648
140812 9:35:53 [ERROR] /usr/libexec/MysqLd: Can't create/write to file '/var/run/MysqLd/MysqLd.pid' (Errcode: 13)
140812 9:35:53 [ERROR] Can't start server: can't create PID file: Permission denied
140812 09:35:53 MysqLd_safe MysqLd from pid file /var/run/MysqLd/MysqLd.pid ended
# chown MysqL:MysqL /var/run/MysqLd
然后启动MysqLd
# service MysqLd start