[英]Timeout error occurred trying to start MySQL Daemon. CentOS 5
I ran into troubles with MySQL on my CentOS. 我在CentOS上遇到了麻烦。 I had some problems and backed up my database and removed mysql with all dependencies.
我遇到了一些问题并备份了我的数据库并删除了所有依赖项的mysql。 After that I ran reinstalled:
之后我跑了重新安装:
yum groupinstall "MySQL Database"
Installed without errors. 安装没有错误。
Running the mysql daemon: 运行mysql守护进程:
service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
I also ran 我也跑了
# /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!
Checking the logs: 检查日志:
less /var/log/mysqld.log
Log file is empty. 日志文件为空。 I don't even know how to debug it and not sure what to do.
我甚至不知道如何调试它,也不知道该怎么做。
Any recommendations? 有什么建议?
Thank you 谢谢
I know you asked this a long time ago, but since people who search for "Timeout error occurred trying to start MySQL Daemon." 我知道你很久以前就问过这个问题,但是因为搜索“Timeout错误的人试图启动MySQL守护进程”。 may end up here, there are several possible solutions to that error.
可能会在这里结束,这个错误有几种可能的解决方案。 Here are some of them:
这里是其中的一些:
First, instead of running service mysqld start
or service mysqld restart
try running: 首先,不要运行
service mysqld start
或service mysqld restart
试运行:
$ service mysqld stop; mysqld_safe &
There are known problems with the mysqladmin
lines in the /etc/init.d/mysqld
script. /etc/init.d/mysqld
脚本中的mysqladmin
行存在已知问题。
If this isn't working, try the following things: check if there is enough free disk space (especially in /var
): 如果这不起作用,请尝试以下事项:检查是否有足够的可用磁盘空间(特别是在
/var
):
$ df -h
$
df -h
Check for possible error messages in these files (not all of them may exist): 检查这些文件中是否存在可能的错误消息(并非所有文件都存在):
# 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
Next up, make sure that /etc/my.cnf
uses... 接下来,确保
/etc/my.cnf
使用...
socket=/var/lib/mysql/mysql.sock
...and that the directory /var/lib/mysql/
actually exists. ...并且目录
/var/lib/mysql/
实际存在。
Set the correct permissions and ownerships: 设置正确的权限和所有权:
# chown -R mysql.mysql /var/lib/mysql/
# chmod g+w /var/run/mysqld/
# chgrp mysql /var/run/mysqld/
Still not working? 还是行不通? Try changing the bind-address in
my.cnf
to 127.0.0.1 or 0.0.0.0, or comment out that line. 尝试将
my.cnf
的bind-address更改为127.0.0.1或0.0.0.0,或注释掉该行。
If you're still out of luck, search for more information about mysql_install_db
and since your InnoDB database may be broken also look into set-variable=innodb_force_recovery=6
. 如果您仍然运气不好,请搜索有关
mysql_install_db
更多信息,因为您的InnoDB数据库可能已损坏,请查看set-variable=innodb_force_recovery=6
。
Hey sometimes it's because you ran out of disk space... so run a cursory df -h
to be sure! 嘿,有时它是因为你的磁盘空间不足...所以运行一个粗略的
df -h
,以确保! (This JUST happened to me :P). (这只是发生在我身上:P)。
Before starting the mysql server rename files /var/lib/mysql/ib_logfile0
and /var/lib/mysql/ib_logfile0
then restart the server 在启动mysql服务器之前重命名文件
/var/lib/mysql/ib_logfile0
和/var/lib/mysql/ib_logfile0
然后重启服务器
in linux/unix 在linux / unix中
mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0_old
mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1_old
then 然后
service mysqld restart
在我的情况下,原因是我在/etc/my.cnf中设置了key_buffer_size,当我评论它时,mysqld开始正常。
尝试这个:
rm $(grep socket /etc/my.cnf | cut -d= -f2) && service mysqld start
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.