Stellen Sie die MySQL-Datenbank von ibdata1 wieder her

Ich habe einen Client, der anscheinend alle seine MySQL-Datenbanken von seinem lokalen Computer verloren hat. Sie laufen auf einem Mac, den ich nicht kenne, und ich bin auf Ubuntu. Der Datenbankordner enthielt keine .MYD- oder .MYI-Dateien, nur .frm-Dateien. Ich ließ sie die Ordner mysql und sight (wobei sight die von uns benötigte Datenbank ist) sowie die Dateien ibdata1, ib_logfile0 und ib_logfile1 komprimieren. Ich habe einen zweiten Ordner für mysql erstellt, / var / lib / mysql2, und die Dateien und Ordner dorthin verschoben. Ich habe den neuen Ordner und die neuen Dateien in mysql: mysql geändert, /etc/mysql/my.cnf bearbeitet, um auf den neuen Ordner zu verweisen, /etc/apparmor.d/usr.sbin.mysqld bearbeitet und apparmor und mysql neu gestartet. Im mysql-Fehlerprotokoll werden jedoch die folgenden Fehler angezeigt:

130308 17:38:16 [Note] Plugin 'FEDERATED' is disabled.
130308 17:38:16  InnoDB: Initializing buffer pool, size = 8.0M
130308 17:38:16  InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130308 17:38:16  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...
130308 17:38:16  InnoDB: Error: space id and page n:o stored in the page
InnoDB: read in are 0:589824, should be 0:7!
130308 17:38:16  InnoDB: Error: page 589824 log sequence number 786432 0
InnoDB: is in the future! Current system log sequence number 0 63932940.
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.1/en/forcing-innodb-recovery.html
InnoDB: for more information.
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 7.
InnoDB: You may have to recover from a backup.
130308 17:38:16  InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; hex 0008000000090000000a0000000b0000000c00000000000000000000000202720000 (snipped because this goes on for a while)
                                                                                 Tg 9  <o q                      E                i F     /     D                ;InnoDB: End of page dump
130308 17:38:16  InnoDB: Page checksum 4146777650, prior-to-4.0.14-form checksum 1800374066
InnoDB: stored checksum 524288, prior-to-4.0.14-form stored checksum 0
InnoDB: Page lsn 786432 0, low 4 bytes of lsn at page end 0
InnoDB: Page number (if stored to page already) 589824,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 7.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.

Ich habe versucht, innodb_force_recovery = 4 zur my.cnf-Datei hinzuzufügen, was eine ganze Reihe verschiedener Fehler erzeugt:

130308 17:48:30 [Note] Plugin 'FEDERATED' is disabled.
130308 17:48:30  InnoDB: Initializing buffer pool, size = 8.0M
130308 17:48:30  InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130308 17:48:30  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...
130308 17:48:30  InnoDB: Error: space id and page n:o stored in the page
InnoDB: read in are 0:589824, should be 0:7!
130308 17:48:30  InnoDB: Error: page 589824 log sequence number 786432 0
InnoDB: is in the future! Current system log sequence number 0 63932940.
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.1/en/forcing-innodb-recovery.html
InnoDB: for more information.
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 7.
InnoDB: You may have to recover from a backup.

und eine ganze Reihe mehr, die ich liefern kann, wenn es hilft. Alle Vorschläge, was Sie von hier aus versuchen können, wären sehr dankbar, danke.

Bearbeiten: Ich habe versucht, die folgenden Schritte auszuführen, hatte jedoch Probleme damit, mysql mit der von ihm verwendeten Befehlszeilensequenz auszuführen:

http://blog.shiraj.com/2012/10/extract-data-from-mysql-ibdata1-data-file/

Antworten auf die Frage(1)

Ihre Antwort auf die Frage