If you are not able to start the mysql daemon repeatedly using your
linux distribution init scripts and you are ready to pull out your
hair in frustration, here is a tip that might help you in finding the
Try running the mysqld_safe from the command line (without using the
init scripts). Try running
/usr/bin/mysqld_safe -v, which should spit
out some debugging information.
If that fails, try calling the
mysqld daemon directly from the command
line, with the "-v" option .
mysqld is usually present under
mysqld can be called with
--print-defaults to get
the command line options it would be run with.
/usr/sbin/mysqld would have been started with the following arguments:
--user=mysql --pid-file=/var/run/mysqld/mysqld.pid .....
Try adding the
-v option to these options to get more verbose details.
When run from command line, mysqld will not detach from console and
will print debugging info that might be useful in finding the cause of
I suggest using 3 terminals to figure out what is going on
- one terminal with tail -f /var/log/mysql/mysqld.err
- one terminal with tail -f /var/log/messages
- one terminal where I ran the
The init scripts are usually good for day to day work. However,
sometimes the init scripts can impede a innodb crash recovery process
on a large database. Some init scripts have timeout built into them
and they can kill mysql while the innodb is still trying to recover