php – MySQL守护程序无法启动 – centos 6

前端之家收集整理的这篇文章主要介绍了php – MySQL守护程序无法启动 – centos 6前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
编辑:查看已签名的答案评论,以解决您的问题.

每当我尝试启动sqlD服务,我得到MySQL守护程序无法启动.我试图通过执行以下操作“开始”服务:

service MysqLd start

当我输入:MysqL

我得到:

ERROR 2002 (HY000): Can't connect to local MysqL server through socket '/var/lib/MysqL/MysqL.sock' (2)

我知道该目录中应该有一个MysqL.sock文件,所以我创建一个.但文件只是自动删除自己,我继续得到错误2002.

由于错误,我也无法登录PHPMyAdmin.我可以访问PHPmyadmin页面,但登录时我得到:#2002无法登录MysqL服务器

编辑:

这是我的MysqL.log文件

131201 13:05:07 MysqLd_safe MysqLd from pid file /var/run/MysqLd/MysqLd.pid ended
131201 13:18:18 MysqLd_safe Starting MysqLd daemon with databases from /var/lib/MysqL
131201 13:18:18 [Note] Plugin 'FEDERATED' is disabled.
/usr/libexec/MysqLd: Can't find file: './MysqL/plugin.frm' (errno: 13)
131201 13:18:18 [ERROR] Can't open the MysqL.plugin table. Please run MysqL_upgrade to create it.
131201 13:18:18 InnoDB: The InnoDB memory heap is disabled
131201 13:18:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131201 13:18:18 InnoDB: Compressed tables use zlib 1.2.3
131201 13:18:18 InnoDB: Using Linux native AIO
131201 13:18:18 InnoDB: Initializing buffer pool,size = 128.0M
131201 13:18:18 InnoDB: Completed initialization of buffer pool
131201 13:18:18  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means MysqLd does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
131201 13:18:18 MysqLd_safe MysqLd from pid file /var/run/MysqLd/MysqLd.pid ended

我跑了MysqL_upgrade并得到

Looking for 'MysqL' as: MysqL
Looking for 'MysqLcheck' as: MysqLcheck
FATAL ERROR: Upgrade Failed
这个错误的最可能的原因是你的MysqL服务器没有运行.当您输入MysqL时,您正在执行MysqL客户端.

尝试:

# sudo service MysqL start
# MysqL

更新(在OP包括登录问题后;从以下评论):

Thanks,saw your log. The log is saying the MysqL user doesn’t have
proper access rights. I’m assuming your MysqL user is MysqL(this can
be verified in /etc/my.cnf,execute

chown -R MysqL:MysqL /var/lib/MysqL

and try starting MysqLd again.

原文链接:https://www.f2er.com/php/139041.html

猜你在找的PHP相关文章