Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Timeout error occurred trying to start MySQL Daemon. CentOS 5

I ran into troubles with MySQL on my CentOS. I had some problems and backed up my database and removed mysql with all dependencies. After that I ran reinstalled:

 yum groupinstall "MySQL Database"

Installed without errors.

Running the mysql daemon:

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

like image 845
ysakiyev Avatar asked Jan 11 '12 20:01

ysakiyev


2 Answers

I know you asked this a long time ago, but since people who search for "Timeout error occurred trying to start MySQL Daemon." 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 stop; mysqld_safe &

There are known problems with the mysqladmin lines in the /etc/init.d/mysqld script.

If this isn't working, try the following things: check if there is enough free disk space (especially in /var):

$ 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...

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

...and that the directory /var/lib/mysql/ actually exists.

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.

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.

like image 167
Norbert Avatar answered Nov 15 '22 02:11

Norbert


Hey sometimes it's because you ran out of disk space... so run a cursory df -h to be sure! (This JUST happened to me :P).

like image 28
h4unt3r Avatar answered Nov 15 '22 02:11

h4unt3r