debugsqlMinor
MySQL Crashed - InnoDB
Viewed 0 times
crashedmysqlinnodb
Problem
Im using mysql 5.5
All of my Tables are in innoDB.
Today my app went down and the mysql was unable to start.
Here are my findings.
```
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
########information that should help you find out what is causing the crash.
170806 10:50:09 [Note] Plugin 'FEDERATED' is disabled.
170806 10:50:09 InnoDB: The InnoDB memory heap is disabled
170806 10:50:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170806 10:50:09 InnoDB: Compressed tables use zlib 1.2.3
170806 10:50:09 InnoDB: Using Linux native AIO
170806 10:50:09 InnoDB: Initializing buffer pool, size = 4.0G
170806 10:50:09 InnoDB: Completed initialization of buffer pool
170806 10:50:09 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
170806 10:50:10 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...
170806 10:50:17 InnoDB: Error: page 7 log sequence number 302558359800
InnoDB: is in the future! Current system log sequence number 294192622092.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
170806 10:50:17 InnoDB: Error: page 1 log sequence number 302441785451
InnoDB: is in the future! Current system log sequence number 294192622092.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
1708
All of my Tables are in innoDB.
Today my app went down and the mysql was unable to start.
Here are my findings.
```
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
########information that should help you find out what is causing the crash.
170806 10:50:09 [Note] Plugin 'FEDERATED' is disabled.
170806 10:50:09 InnoDB: The InnoDB memory heap is disabled
170806 10:50:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170806 10:50:09 InnoDB: Compressed tables use zlib 1.2.3
170806 10:50:09 InnoDB: Using Linux native AIO
170806 10:50:09 InnoDB: Initializing buffer pool, size = 4.0G
170806 10:50:09 InnoDB: Completed initialization of buffer pool
170806 10:50:09 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
170806 10:50:10 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...
170806 10:50:17 InnoDB: Error: page 7 log sequence number 302558359800
InnoDB: is in the future! Current system log sequence number 294192622092.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
170806 10:50:17 InnoDB: Error: page 1 log sequence number 302441785451
InnoDB: is in the future! Current system log sequence number 294192622092.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
1708
Solution
As per your log it shows
InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB:
http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
As per MySQL documentation Here for
you can add the following line to the [mysqld] section of your option file before restarting the server:
Warning
Only set
emergency situation, so that you can start
tables. Before doing so, ensure that you have a backup copy of your
database in case you need to recreate it. Values of 4 or greater can
permanently corrupt data files. Only use an
setting of 4 or greater on a production server instance after you have
successfully tested the setting on a separate physical copy of your
database. When forcing
necessary.
you have corruption in the InnoDB tablespace.InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB:
http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
As per MySQL documentation Here for
Forcing InnoDB Recoveryyou can add the following line to the [mysqld] section of your option file before restarting the server:
[mysqld]
innodb_force_recovery = 1Warning
Only set
innodb_force_recovery to a value greater than 0 in anemergency situation, so that you can start
InnoDB and dump yourtables. Before doing so, ensure that you have a backup copy of your
database in case you need to recreate it. Values of 4 or greater can
permanently corrupt data files. Only use an
innodb_force_recoverysetting of 4 or greater on a production server instance after you have
successfully tested the setting on a separate physical copy of your
database. When forcing
InnoDB recovery, you should always start withinnodb_force_recovery=1 and only increase the value incrementally, asnecessary.
Code Snippets
[mysqld]
innodb_force_recovery = 1Context
StackExchange Database Administrators Q#182790, answer score: 5
Revisions (0)
No revisions yet.