MySQL不会在CentOS 5.5和“ERROR 2002”中启动

时间:2012-05-11 13:46:19

标签: mysql selinux mysql-error-2002

我想问一下我遇到的问题的帮助。安装php-soap后,我的mysql服务器突然停止了。我不知道为什么它实际上会停止......

因为它已停止我尝试通过键入行来启动它:

# /etc/init.d/mysqld start

在此之后,我收到了这条消息:

MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]

启动mysql似乎失败了。因为我尝试了很多次并且得到了这个结果很多次。我检查了mysqlog,这是我得到的。

==== MYSQL LOG ====

120511 21:34:43 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120511 21:34:43 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 481 error messages,
but it should contain at least 641 error messages.
Check that the above file is the right version for this program!
/usr/libexec/mysqld: Unknown error 1146
120511 21:34:43 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120511 21:34:43  InnoDB: Initializing buffer pool, size = 8.0M
120511 21:34:44  InnoDB: Completed initialization of buffer pool
120511 21:34:44  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.
120511 21:34:44 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

其他信息:

操作系统:CentOS 5.5 64位

Mysql版本:抱歉,由于我遇到此错误,我无法在我的服务器上安装mysql版本:

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

有人可以帮我解决这个问题吗?

先谢谢你。

1 个答案:

答案 0 :(得分:1)

看起来你的mysql安装没有损坏/usr/share/mysql/english/errmsg.sys被修改为包含少于所需的条目数。

我会再次为你的centos盒获取mysql的安装/ src文件。解开它并从sql / share / english找到文件errmsg.sys,将其复制到/usr/share/mysql/english/errmsg.sys并重启你的mysqld。另一个选择就是从centos repo重新安装mysql,备份你的dbs以确保它们不被吹走并拥有它的副本/备份。

我还会找出对errmsg.sys文件进行更改的原因。