January 16, 2005 4:55 PM
mysqld kept on crashing every time I tried to start it:

#/sbin/service mysqld start
Timeout error occurred trying to start MySQL Daemon.
#cat /var/log/mysqld.log
050116 02:32:31  mysqld started
050116  2:32:31  bdb:  PANIC: No such file or directory
050116  2:32:31  Can't init databases
050116 02:32:31  mysqld ended

Googling for it didn't help. There were threads on comp.os.linux.misc that discussed the problem. The solutions there didn't help. After I had wasted a lot of time getting frustrated, I read in the manual that if any log files were left over in the mysql data directory, mysqld won't start due to the bdb1 module.

Running safe_mysqld with the --skip-bdb argument worked. I checked the mysqld folder and found the culprit: a log.log file. Deleting it fixed everything.

So, next time your mysqld crashes or gets killed and leaves log files, delete all files ending with .log2 in the mysql data directory unless you are using the skip-bdb option in my.cnf3.


[1] BerkeleyDB table support.
[2] Optionally, run myisamchk --force *.MYI as well to repair any damages to the tables.
[3] Or prefer banging your head against the wall in sheer rage.

Copyright © 2004-2011 Anirudh Sasikumar. All rights reserved.
Last Updated: January 21, 2005 1:42 PM