Thesql can’t start, can’t dump. Error: page 5 log sequence number

innodbMySQL

I have an error in MySQL while i am starting the MySQL database. The Error show is as mention below;

Aug 11 13:03:28 kutuphane mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28 [Note] Plugin 'FEDERATED' is disabled.
Aug 11 13:03:28 kutuphane mysqld: #007/usr/sbin/mysqld: Incorrect information in file: './mysql/plugin.frm'
Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28  InnoDB: Initializing buffer pool, size = 8.0M
Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28  InnoDB: Completed initialization of buffer pool
Aug 11 13:03:28 kutuphane mysqld: InnoDB: The log sequence number in ibdata files does not match
Aug 11 13:03:28 kutuphane mysqld: InnoDB: the log sequence number in the ib_logfiles!
Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28  InnoDB: Database was not shut down normally!
Aug 11 13:03:28 kutuphane mysqld: InnoDB: Starting crash recovery.
Aug 11 13:03:28 kutuphane mysqld: InnoDB: Reading tablespace information from the .ibd files...
Aug 11 13:03:28 kutuphane mysqld: InnoDB: Restoring possible half-written data pages from the doublewrite
Aug 11 13:03:28 kutuphane mysqld: InnoDB: buffer...
Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28  InnoDB: Error: page 5 log sequence number 0 69715
Aug 11 13:03:28 kutuphane mysqld: InnoDB: is in the future! Current system log sequence number 0 69644.
Aug 11 13:03:28 kutuphane mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB
Aug 11 13:03:28 kutuphane mysqld: InnoDB: tablespace but not the InnoDB log files. See
Aug 11 13:03:28 kutuphane mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html
Aug 11 13:03:28 kutuphane mysqld: InnoDB: for more information.
Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28  InnoDB: Started; log sequence number 0 69644
Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './mysql/host.frm'
Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect information in file: './mysql/host.frm'
Aug 11 13:03:28 kutuphane mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
Aug 11 13:03:42 kutuphane /etc/init.d/mysql[3528]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Aug 11 13:03:42 kutuphane /etc/init.d/mysql[3528]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Aug 11 13:03:42 kutuphane /etc/init.d/mysql[3528]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Aug 11 13:03:42 kutuphane /etc/init.d/mysql[3528]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Aug 11 13:03:42 kutuphane /etc/init.d/mysql[3528]: 

It is my.cnf file

[client]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket      = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket      = /var/run/mysqld/mysqld.sock
port        = 3306
basedir     = /usr
datadir     = /var/lib/mysql
tmpdir      = /tmp
language    = /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address        = localhost
#
# * Fine Tuning
#
key_buffer      = 16M
max_allowed_packet  = 16M
thread_stack        = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 1000
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit   = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
general_log_file        = /var/log/mysql/mysql.log
general_log             = 1
#
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
#
# Here you can see queries with especially long duration
#log_slow_queries   = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id      = 1
#log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 100M
#binlog_do_db       = include_database_name
#binlog_ignore_db   = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet  = 16M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer      = 16M

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

I can't dump database, what should i do to reach database?

******UPDATED******

I changed parameter innodb_force_recovery = 1 than it gives same error.
Error is in syslog file

Aug 22 16:47:14 kutuphane mysqld: #007/usr/sbin/mysqld: Incorrect information in file: './mysql/plugin.frm'
Aug 22 16:47:14 kutuphane mysqld: 160822 16:47:14 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Aug 22 16:47:14 kutuphane mysqld: 160822 16:47:14  InnoDB: Initializing buffer pool, size = 8.0M
Aug 22 16:47:14 kutuphane mysqld: 160822 16:47:14  InnoDB: Completed initialization of buffer pool
Aug 22 16:47:14 kutuphane mysqld: InnoDB: The log sequence number in ibdata files does not match
Aug 22 16:47:14 kutuphane mysqld: InnoDB: the log sequence number in the ib_logfiles!
Aug 22 16:47:14 kutuphane mysqld: 160822 16:47:14  InnoDB: Database was not shut down normally!
Aug 22 16:47:14 kutuphane mysqld: InnoDB: Starting crash recovery.
Aug 22 16:47:14 kutuphane mysqld: InnoDB: Reading tablespace information from the .ibd files...
Aug 22 16:47:14 kutuphane mysqld: InnoDB: Restoring possible half-written data pages from the doublewrite
Aug 22 16:47:14 kutuphane mysqld: InnoDB: buffer...
Aug 22 16:47:14 kutuphane mysqld: 160822 16:47:14  InnoDB: Error: page 5 log sequence number 0 69715
Aug 22 16:47:14 kutuphane mysqld: InnoDB: is in the future! Current system log sequence number 0 69644.
Aug 22 16:47:14 kutuphane mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB
Aug 22 16:47:14 kutuphane mysqld: InnoDB: tablespace but not the InnoDB log files. See
Aug 22 16:47:14 kutuphane mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html
Aug 22 16:47:14 kutuphane mysqld: InnoDB: for more information.
Aug 22 16:47:14 kutuphane mysqld: 160822 16:47:14  InnoDB: Started; log sequence number 0 69644
Aug 22 16:47:14 kutuphane mysqld: InnoDB: !!! innodb_force_recovery is set to 1 !!!
Aug 22 16:47:14 kutuphane mysqld: 160822 16:47:14 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './mysql/host.frm'
Aug 22 16:47:14 kutuphane mysqld: 160822 16:47:14 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect information in file: './mysql/host.frm'
Aug 22 16:47:14 kutuphane mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
Aug 22 16:47:28 kutuphane /etc/init.d/mysql[24753]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Aug 22 16:47:28 kutuphane /etc/init.d/mysql[24753]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Aug 22 16:47:28 kutuphane /etc/init.d/mysql[24753]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Aug 22 16:47:28 kutuphane /etc/init.d/mysql[24753]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Aug 22 16:47:28 kutuphane /etc/init.d/mysql[24753]: 

Best Answer

As per your Mysql Database error shown like that

Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28  InnoDB: Database was not shut down normally!
Aug 11 13:03:28 kutuphane mysqld: InnoDB: Starting crash recovery.
Aug 11 13:03:28 kutuphane mysqld: InnoDB: Reading tablespace information from the .ibd files...
Aug 11 13:03:28 kutuphane mysqld: InnoDB: Restoring possible half-written data pages from the doublewrite
Aug 11 13:03:28 kutuphane mysqld: InnoDB: buffer...
Aug 11 13:03:28 kutuphane mysqld: 160811 13:03:28  InnoDB: Error: page 5 log sequence number 0 69715
Aug 11 13:03:28 kutuphane mysqld: InnoDB: is in the future! Current system log sequence number 0 69644.
Aug 11 13:03:28 kutuphane mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB
Aug 11 13:03:28 kutuphane mysqld: InnoDB: tablespace but not the InnoDB log files. See
Aug 11 13:03:28 kutuphane mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html

This Part http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html As MySQL documentation Forcing InnoDB Recovery

As you are not able to start the mysql due to database page corruption. To make a backup of your crashed tables. edit your /etc/my.cnf and add

[mysqld]
innodb_force_recovery = 1

Warning

Only set innodb_force_recovery to a value greater than 0 in an emergency situation, so that you can start InnoDB and dump your 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 innodb_force_recovery setting of 4 or greater on a production server instance after you have successfully tested the setting on separate physical copy of your database. When forcing InnoDB recovery, you should always start with innodb_force_recovery=1 and only increase the value incrementally, as necessary.

As Jonathan has cleary written the whole process of instructions Here

For ref Here