![故障した HD からの MySQL データ移行を妨げるエラーを修正するにはどうすればよいですか?](https://rvso.com/image/1518696/%E6%95%85%E9%9A%9C%E3%81%97%E3%81%9F%20HD%20%E3%81%8B%E3%82%89%E3%81%AE%20MySQL%20%E3%83%87%E3%83%BC%E3%82%BF%E7%A7%BB%E8%A1%8C%E3%82%92%E5%A6%A8%E3%81%92%E3%82%8B%E3%82%A8%E3%83%A9%E3%83%BC%E3%82%92%E4%BF%AE%E6%AD%A3%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F.png)
故障した HD から MySQL データベースを復元しようとしています。古いファイルのコピーについては、ここの指示に従いました。https://stackoverflow.com/questions/40479395/export-mysql-datatabase-from-a-dead-hard-drive-xamppしかし、エラー ログに次のメッセージが表示されます。
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
古いデータベースは 5.5.40 で、新しいデータベースは 5.5.54 です。まったく同じバージョンを正常にインストールできなかったためです (インストーラーに必要なダウンロード リンクが機能しなくなりました)。エラーは、ファイルに指定されているサイズだけの問題です.cnf
か、それとも何か他のものを隠しているのでしょうか?
答え1
@ITSolutions のおかげで、問題を解決できました。
cnf
ファイルはここにありますC:\Program Files\MySQL\MySQL Server 5.5\my.ini
(場所は異なる場合があります)。
以下の変更を加え (コメントアウトされた元の値に注意)、MySQL サービスを再起動しました。
# 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
数秒以内に読み込まれ、すべてのデータに再びアクセスできるようになりました。