I had a mysql server running on a Mac. Unfortunately, the Mac died. However, I got a backup. I am now trying to restore the server on a Linux machine.

I have moved the mysql files located in /usr/local/var/mysql on the linux.

I gave full 777 permissions to the directly on linux to make sure that I have no permissions issues.

When I try to run the MySQL server, it fails and I get this error in the logs:

InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!

When I delete the log files (ib_logfile0, ib_logfile1), I get: http://pastebin.com/rYMti8DK

Do you have any idea how I can restore my database correctly?

  • Borrow another Mac and install mysql on that, and use that to dump the database. Then you can import the dump in your LInux box. – Thorbjørn Ravn Andersen Dec 19 '14 at 14:14

You need to use the same MySQL configuration on the Linux system as you used on the Mac. The error message in your question comes because InnoDB log file settings are different in your Linux.

  • You were right. The MySQL version on Linux was not the same as the MacOS one. – user37220 Dec 19 '14 at 15:48
  • 1
    Just to clarify, you need the same my.cnf configuration file. Minor version differences (5.5.x vs 5.5.y) shouldn't matter. – Tero Kilkanen Dec 19 '14 at 17:04
  • I was using MySQL 5.5 on Linux and 5.6 on OS X. – user37220 Dec 22 '14 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.