On 3/11/07, Jean-Sebastien Pilon <[EMAIL PROTECTED]> wrote:
I am running a mysql database server and we experienced a power failure.
The mysql server does not want to restart because innodb is corrupted.

Version info:

Mysql version 4.1.11-Debian_4sarge7-log
Debian sarge
Reiserfs filesystem

What I have tried:

- Ran reiserfsck to fix corrupted file system. It fixed some problems,
now says no corruption.
- Restarted mysql with no success
- Restarted mysql with innodb_force_recovery = 4 option, with no success
- Restarted mysql with innodb_force_recovery = 6 option, mysql starts,
but cannot access any data in my different schemas/tables

See below for mysql startup log

What should I do next ?

Unfortuantely, it looks like your InnoDB tablespace is beyond
recovery. If this data is critical and you don't have a backup, it
might be worth getting MySQL Enterprise Support for this server and
have them try and recover it -- see https://shop.mysql.com/enterprise/
for details.

Assuming you have a backup of your data and you want to get the server
back up and running so you can restore from this backup, you need to
shut down the server, delete the corrupted InnoDB tablespace and
associated .frm files, and start it up again (which will cause the
server to re-create the tablespace from scratch):

1. Shut down mysql (/etc/init.d/mysql stop on Debian, iirc)

2. Go into your data directory, and run:
a. rm -f ib*
b. for f in `find -name \*.ibd`; do b=`echo $f | sed 's/.ibd//g'`; rm
-f $b.ibd $b.frm ; done

3. Start the server again (/etc/init.d/mysql start on Debian, iirc)

4. Restore your backup (I'm assuming this is in a .sql file) by
running the relevant sections back through the mysql program.

By the way, a power outage shouldn't cause the InnoDB tablespace to
become corrupted like this, it's ACID-compliant. It's possible that
your disk system is doing some caching you don't know about, resulting
in MySQL thinking data is on disk (or guaranteed to be put on disk)
when it actually isn't. See http://brad.livejournal.com/2116715.html
for details on how to test (and fix) this.


-- Alex

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to