Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2015
    Posts
    1

    Answered: MySQL Innodb data loss

    Hello guys,

    I have moved mysql dir to another server like I always do then tried to start mysql and surprise.

    I have Innodb errors and server won't start.
    120716 21:08:07 InnoDB: Error: page 4808 log sequence number 51216815853
    InnoDB: is in the future! Current system log sequence number 51216526720.
    InnoDB: Your database may be corrupt or you may have copied the InnoDB
    InnoDB: tablespace but not the InnoDB log files.

    With innodb_force_recovery = 4 server is starting, but it crashes on every request and I can't dump any database.

    mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `table`': Lost connection to MySQL server during query (2013).

    Anyone able to give me an advice, please?

    Regards,

    Any ideas please...

  2. Best Answer
    Posted by balighawad

    "For the easy recovery with binary backup, you can just simply follow these steps:

    -Edit my.cnf (usually located in /etc/my.cnf) and add this line into

    [mysqld] section
    innodb_force_recovery=4

    With value set to 4, no background process is allowed to modify the database so that we can safely do the recovery process. For more information about this configuration directive, please refer to online resource provided by MySQL

    -Stop mysqld (e.g: /etc/init.d/mysqld stop) and move your backup to mysql data folder.
    Binary backup that has to be moved consists of ibdata, ib_logfile0, ib_logfile1, and your database directory.

    -Start mysqld and check all tables. Run some arbitrary queries. If there is no more error, recovery process has been successful.
    You can also check your log to make sure that the recovery process was completed.

    -Comment the line you made in #1, and restart mysqld

    -Optimize all tables and done

    As easy and fast solution for restoring MySQL InnoDB corruption might be following third party software https://www.repairtoolbox.com/mysqlrepair.html Repair Toolbox for MySQL"


  3. #2
    Join Date
    Mar 2015
    Posts
    1
    Shutting Down and Restoring a Database by following command

    mysqladmin --defaults-file=/usr/local/mysql/my.cnf --user=root --password shutdown
    mysqlbackup --defaults-file=/usr/local/mysql/my.cnf \
    --backup-dir=/export/backups/full \
    copy-back

    AND/OR

    Read and learn following resources...

    http://www.filerepairforum.com/forum...came-corrupted - a lot of mysql trouble and explanations how to overcome them
    http://www.sqlservercentral.com/Foru...94-2893-1.aspx - the same branch of discussions related to your trouble
    http://www.sql.repairtoolbox.com/ Repair Toolbox for MySQL - restores mysql databases

  4. #3
    Join Date
    Apr 2015
    Posts
    2
    For the easy recovery with binary backup, you can just simply follow these steps:

    -Edit my.cnf (usually located in /etc/my.cnf) and add this line into

    [mysqld] section
    innodb_force_recovery=4

    With value set to 4, no background process is allowed to modify the database so that we can safely do the recovery process. For more information about this configuration directive, please refer to online resource provided by MySQL

    -Stop mysqld (e.g: /etc/init.d/mysqld stop) and move your backup to mysql data folder.
    Binary backup that has to be moved consists of ibdata, ib_logfile0, ib_logfile1, and your database directory.

    -Start mysqld and check all tables. Run some arbitrary queries. If there is no more error, recovery process has been successful.
    You can also check your log to make sure that the recovery process was completed.

    -Comment the line you made in #1, and restart mysqld

    -Optimize all tables and done

    As easy and fast solution for restoring MySQL InnoDB corruption might be following third party software Repair Toolbox for MySQL http://www.sql.repairtoolbox.com/

  5. #4
    Join Date
    Apr 2015
    Posts
    2
    Visit following thread dedicated to mysql issues http://www.sqlservercentral.com/Foru...94-2893-1.aspx - the same branch of discussions related to your trouble

  6. #5
    Join Date
    Apr 2015
    Posts
    1
    Provided Answers: 1
    For the easy recovery with binary backup, you can just simply follow these steps:

    -Edit my.cnf (usually located in /etc/my.cnf) and add this line into

    [mysqld] section
    innodb_force_recovery=4

    With value set to 4, no background process is allowed to modify the database so that we can safely do the recovery process. For more information about this configuration directive, please refer to online resource provided by MySQL

    -Stop mysqld (e.g: /etc/init.d/mysqld stop) and move your backup to mysql data folder.
    Binary backup that has to be moved consists of ibdata, ib_logfile0, ib_logfile1, and your database directory.

    -Start mysqld and check all tables. Run some arbitrary queries. If there is no more error, recovery process has been successful.
    You can also check your log to make sure that the recovery process was completed.

    -Comment the line you made in #1, and restart mysqld

    -Optimize all tables and done

    As easy and fast solution for restoring MySQL InnoDB corruption might be following third party software https://www.repairtoolbox.com/mysqlrepair.html Repair Toolbox for MySQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •