mysql - 尝试启动 MySQL 守护进程时发生超时错误。中央操作系统 5

标签 mysql timeout centos

我在 CentOS 上遇到了 MySQL 问题。 我遇到了一些问题并备份了我的数据库并删除了所有依赖项的 mysql。 之后我重新安装了:

 yum groupinstall "MySQL Database"

安装没有错误。

运行 mysql 守护进程:

service mysqld start

Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:                                            [FAILED]

我也跑了

# /usr/bin/mysql_install_db --user=mysql
Installing MySQL system tables...
120112  1:49:44 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys'  had only 480 error messages,
but it should contain at least 481 error messages.
Check that the above file is the right version for this program!
120112  1:49:44 [ERROR] Aborting

Installation of system tables failed!

Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/libexec/mysqld --skip-grant &
and use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!

检查日志:

less /var/log/mysqld.log

日志文件为空。我什至不知道如何调试它,也不知道该怎么做。

有什么建议吗?

谢谢

最佳答案

我知道您很久以前就问过这个问题,但是由于搜索“尝试启动 MySQL 守护程序时发生超时错误。” 的人可能会在这里结束,因此有几种可能的解决方案来解决该错误.以下是其中一些:

首先,不要运行 service mysqld startservice mysqld restart 尝试运行:

$ service mysqld stop; mysqld_safe &

/etc/init.d/mysqld 脚本中的 mysqladmin 行存在已知问题。

如果这不起作用,请尝试以下操作:检查是否有足够的可用磁盘空间(尤其是在 /var 中):

$ df -h

检查这些文件中可能存在的错误消息(可能并非所有文件都存在):

# tail -n 30/var/log/messages

# tail -n 30/var/log/mysqld.log

# tail -n 30/var/lib/mysql/*.err

# tail -n 30/var/log/mysql/error.log

接下来,确保 /etc/my.cnf 使用...

socket=/var/lib/mysql/mysql.sock

...并且目录 /var/lib/mysql/ 确实存在。

设置正确的权限和所有权:

# chown -R mysql.mysql/var/lib/mysql/

# chmod g+w/var/run/mysqld/

# chgrp mysql/var/run/mysqld/

还是不行?尝试将 my.cnf 中的 bind-address 更改为 127.0.0.1 或 0.0.0.0,或注释掉该行。

如果您仍然不走运,请搜索有关 mysql_install_db 的更多信息,因为您的 InnoDB 数据库可能已损坏,请查看 set-variable=innodb_force_recovery=6 .

关于mysql - 尝试启动 MySQL 守护进程时发生超时错误。中央操作系统 5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8826034/

相关文章:

javascript - 输入字段 - 千位 (1,000) 和小数 (.00) 的财务计算和逗号显示

javascript - 谷歌地图API3,折线不在中心且未缩放

java - centos 5 上的队列计量学

linux - 由于套接字绑定(bind)错误,Apache 不会在启动时启动,而是手动启动

mysql - 嵌套集中重复节点名称

mysql - 如何在共享主机上使用 C# 的 mySql DB?

macos - launchd ExitTimeOut 不起作用

MySQL 进程卡住

php - 使用 Fat-Free-Framework 生成 HTTP 错误

c++ - WaitForSingleObject 不会超时 - C++