I work for a small company made up of a salesman, a graphic artist, and an engineer.
The engineer writes and maintains all of his own software to run a network of interactive kiosks around the globe.
As artist, I use his tools to maintain and update the network content.
Last month, the engineer died of a heart attack - leaving me and the salesman to keep the network running.

The power supply went out on the pc hosting the mysql server and corrupted the db. I am trying to recover the db, but I am flying blind.

All I have to go on are the instructions on how to reboot the server should it go down.
This tells me where the db is located the user name and password.

When I run the start up, I get errors such as:

InnoDB: Error: page XX log sequence number 0 36808 is in the future!
InnoDB: Current system log sequence number 0 8204.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
tablespace but not the InnoDB log files. See blah, blah for more
information.

At home, I have a testing server using XAMPP and have a basic knowledge of how to use it.

Here at work, I cannot tell what server is running and how to even access it. In my notes I have the two lines:

mysqladmin -uroot -address ping
mysqladmin -uroot -password ping

so I'm assuming that he was using mysqladmin to administer the db

This is hosted on a windows xp machine and only used on the local network.

Dani AI

Generated

A short, practical recovery plan for an InnoDB LSN / crash-recovery error on a Windows host (context: reported an XP box with InnoDB pages/LSN in the future). First rule: do not overwrite or delete anything yet. Make a full file-system copy of the entire MySQL data directory, the server config (my.ini or my.cnf) and the MySQL error log to a separate disk. The error log in the data directory contains the precise InnoDB messages and the server version; check it before guessing. MySQL on Windows: troubleshooting and data-directory notes. (dev.mysql.com)

Ordered, low-risk workflow to try on the copied files: add a forced-recovery setting to the server config, start only to extract data, then rebuild a clean server and import. In my.ini put under [mysqld]:

[mysqld]
innodb_force_recovery=1

Start with 1 and increase only as required (1->2->3 ... up to 6). This makes InnoDB start in progressively more read-only, dump-friendly modes so tables can be exported; higher values (>=4) risk permanent damage. When the server starts, export with a logical dump (for example use mysqldump --all-databases) and verify the SQL files before doing any destructive steps on the originals. See the MySQL guidance on forcing InnoDB recovery and mysqldump usage. Forcing InnoDB recoverymysqldump manual. (dev.mysql.com)

If forced recovery does not allow usable dumps, avoid ad-hoc deletions or LSN edits on the live copy. As pointed out, LSN-forward fixes (Percona and similar writeups) are advanced and risky. ’s advice about clean shutdowns and backups is practical. If the data is critical and dumps cannot be produced, follow ’s suggestion to engage an experienced InnoDB recovery specialist and preserve untouched copies of the original datadir for forensic attempts.

Recommended Answers

All 3 Replies

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/databases/databases-aa/mysql/1395-%E2%80%8Bmysql-table-became-corrupted - a lot of mysql trouble and explanations how to overcome them
http://www.sqlservercentral.com/Forums/Topic1618894-2893-1.aspx - the same branch of discussions related to your trouble
https://www.repairtoolbox.com/mysqlrepair.html Repair Toolbox for MySQL - restores MySQL databases

Member Avatar for Member #120589

The Percona link was one I was going to suggest, but it's not for the uninitiated. This may be beyond your level of expertise (no offence). Restoring this type of issue can be horrendously complicated, as I'm sure you've surmised.

Your best bet may be to bite the bullet and ask for professional help. That is, to pay an expert. I believe Percona have such a service.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.