MySQL守护进程无法启动-centos 6 [英] MySQL Daemon Failed to Start - centos 6

查看:245
本文介绍了MySQL守护进程无法启动-centos 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看选中的答案注释,以解决您的问题.

Look at the checkmarked answer comments to get your issue solved.

每当我尝试启动SQLD服务时,我都会启动MySQL守护程序失败.实际上,我尝试通过执行以下操作启动"服务:

Whenever I try to start the SQLD service I get MySQL Daemon Failed to Start. I infact tried to "start" the service by doing the following:

service mysqld start

当我键入:mysql

When I type: mysql

我得到:

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

我知道该目录中应该有一个mysql.sock文件,因此我创建了一个.但是该文件只是自动删除其自身,因此我继续收到错误2002.

I know that there should be a mysql.sock file in that directory, so I create one. But the file just auto removes its self and I continue to get the error 2002.

由于该错误,我也无法登录PHPMyAdmin.我可以访问phpmyadmin页面,但是登录时得到:#2002 Cannot log in to the MySQL server

I am also unable to log into PHPMyAdmin due to the error. I can access phpmyadmin page but when logging in I get: #2002 Cannot log in to the MySQL server

这是我的mysql.log文件:

Here is my mysql.log file:

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并获得

I ran mysql_upgrade and got

Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed

推荐答案

此错误的最可能原因是您的mysql服务器未运行.当您键入mysql时,您正在执行mysql客户端.

The most likely cause for this error is that your mysql server is not running. When you type in mysql you are executing mysql client.

尝试:

# sudo service mysql start
# mysql

更新(在包含OP之后登录问题;摘自以下评论):

Update (after OP included log in the question; taken from the comments below):

谢谢,看到了您的日志.日志说mysql用户没有 适当的访问权限.我假设您的mysql用户是mysql(这可以 在/etc/my.cnf中进行验证,执行

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

,然后尝试重新启动mysqld.

这篇关于MySQL守护进程无法启动-centos 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆