![Wie kann ich den Fehler beheben, der die MySQL-Datenmigration von einer defekten Festplatte verhindert?](https://rvso.com/image/1518696/Wie%20kann%20ich%20den%20Fehler%20beheben%2C%20der%20die%20MySQL-Datenmigration%20von%20einer%20defekten%20Festplatte%20verhindert%3F.png)
Ich versuche, eine MySQL-Datenbank von einer defekten Festplatte wiederherzustellen. Ich bin den Anweisungen hier zum Kopieren der alten Dateien gefolgt:https://stackoverflow.com/questions/40479395/export-mysql-datatabase-from-a-dead-hard-drive-xamppaber ich erhalte die folgende Meldung in meinem Fehlerprotokoll:
170114 22:21:07 [Note] Plugin 'FEDERATED' is disabled.
170114 22:21:07 InnoDB: The InnoDB memory heap is disabled
170114 22:21:07 InnoDB: Mutexes and rw_locks use Windows interlocked functions
170114 22:21:07 InnoDB: Compressed tables use zlib 1.2.3
170114 22:21:07 InnoDB: Initializing buffer pool, size = 38.0M
170114 22:21:07 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 56623104 bytes
InnoDB: than specified in the .cnf file 0 19922944 bytes!
170114 22:21:07 [ERROR] Plugin 'InnoDB' init function returned error.
170114 22:21:07 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170114 22:21:07 [ERROR] Unknown/unsupported storage engine: INNODB
170114 22:21:07 [ERROR] Aborting
170114 22:21:07 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld.exe: Shutdown complete
Die alte Datenbank war 5.5.40 und die neue ist 5.5.54, da ich nicht in der Lage war, genau dieselbe Version erfolgreich zu installieren (die Download-Links, die das Installationsprogramm benötigt, funktionieren nicht mehr). Liegt der Fehler einfach an der in der .cnf
Datei angegebenen Größe oder wird dahinter etwas anderes versteckt?
Antwort1
Dank @ITSolutions habe ich das Problem gelöst.
Ich habe meine cnf
Datei hier gefunden C:\Program Files\MySQL\MySQL Server 5.5\my.ini
(der Speicherort kann manchmal unterschiedlich sein).
Ich habe die folgenden Änderungen vorgenommen (beachten Sie die auskommentierten Originalwerte) und den MySQL-Dienst neu gestartet.
# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system. Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
#innodb_buffer_pool_size=38M
innodb_buffer_pool_size=108M
# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
#innodb_log_file_size=19M
innodb_log_file_size=54M
Es war innerhalb weniger Sekunden geladen und alle meine Daten sind wieder zugänglich!