From time to time my MySQL 4.1 Windows service is crashing with the following lines inside the log:

091218  9:31:25  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
091218  9:31:33  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 2 817025450.
InnoDB: Doing recovery: scanned up to log sequence number 2 817025450
091218  9:31:35  InnoDB: Flushing modified pages from the buffer pool...
091218  9:31:35  InnoDB: Started; log sequence number 2 817025450
C:\Programme\MySQL\MySQL Server 4.1\bin\mysqld-nt: ready for connections.
Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary

100107  9:02:51  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
100107  9:02:53  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 2 953338420.
InnoDB: Doing recovery: scanned up to log sequence number 2 953338420
100107  9:02:53  InnoDB: Flushing modified pages from the buffer pool...
100107  9:02:53  InnoDB: Started; log sequence number 2 953338420
C:\Programme\MySQL\MySQL Server 4.1\bin\mysqld-nt: ready for connections.
Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary

Those messages are not pointing at any specific problem. What can I do to trace the origin of the crashes?

link|improve this question

71% accept rate
Those log entries are printed when MySQL starts again after a crash. What's in the log from the time of the crash? – womble Jan 19 '10 at 9:06
I added some more lines of the log file - but its just repeating itself. – Martin Jan 19 '10 at 11:02
feedback

2 Answers

up vote 0 down vote accepted
  1. Stop the database

  2. Dump (or backup) your database.

  3. Remove everything in the data(windows) or /var(UNIX) directory.

  4. restart the db (now the db will start)

  5. restore mysql directory.

  6. stop db

  7. restore other databases and tables

  8. start db

link|improve this answer
feedback

I believe you need to set the innodb_force_recovery=2 setting and do a mysql dump, delete the original database directory and recreate it using an import. This article has more detailed steps.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.