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?
Best Answer
Stop the database
Dump (or backup) your database.
Remove everything in the data(windows) or /var(UNIX) directory.
restart the db (now the db will start)
restore mysql directory.
stop db
restore other databases and tables
start db