Upgrading MySQL 5.1 to 5.6 service failed to start

Recently I got the system which has MySQL server version 5.1 was running. It was good chance for me to reproduce the issue and show practical answer on question asked on stackoverflow.

Operating System: CentOS 6.5
Arch : x86_54

Symptom MySQL service failed to start after upgrading from MySQL 5.1 to 5.6 version.

Given below is the error found after upgrading to MySQL server version 5.6 from 5.1. You can get the below error in MySQL error log file.

2014-11-29 02:22:56 2175 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
2014-11-29 02:22:56 2175 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2014-11-29 02:22:56 2175 [ERROR] Plugin ‘InnoDB’ init function returned error.
2014-11-29 02:22:56 2175 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
2014-11-29 02:22:56 2175 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-11-29 02:22:56 2175 [ERROR] Aborting

Solution :

To solve this problem add the below given line in /etc/my.cnf file inside [mysqld] block.

innodb_data_file_path = ibdata1:10M:autoextend

Now restart the mysql service.

service mysqld restart

I hope the issue is resolved for you also.

Reference taken from MySQL knowledge base.


Posted

in

,

by

Tags:

Comments

12 responses to “Upgrading MySQL 5.1 to 5.6 service failed to start”

  1. Reza Avatar
    Reza

    Thank you! I was straggling with that for hours, and you saved me! ??

    1. Sharad Chhetri Avatar

      Thank You Reza!

      Regards
      Sharad

  2. Alejandro Avatar
    Alejandro

    Thank you very much

    1. Sharad Chhetri Avatar

      Welcome Alejandro!

      Regards
      Sharad

  3. SNB Avatar
    SNB

    You’re my hero!

  4. Palash Avatar
    Palash

    I wanted to upgrade MySQL 5.1.6 to 5.6 is this the better option or going to 5.5 is the one to proceed with. I have a MySQL version with around 10 huge DB and thinking of creating an instance of MySQL version on the same server and try the testing and upgrades on it.

    If everything goes well, replicating the same on the live MySQL version. Let me know your thoughts on it and just to inform that I have CentOS 6.x version installed and wanted to upgrade on this platform.

    1. Sharad Chhetri Avatar

      Hello Palash,

      It is good to proceed for up-gradation 5.1 > 5.6 > 5.7 . You have to make sure the application is compatible with the Database.
      I will strongly advise you to read the release notes of MySQL version 5.1,5.6 and 5.7 to know the difference between them. You have to find out in which area of DB you should be careful.
      Hence, perform the testing in staging server and never forget to take the latest DB backup.

      Regards
      Sharad

  5. lirui Avatar
    lirui

    Thank you very much!

    1. sharad chhetri Avatar

      Hello Lirui,

      You are most welcome.

      Regards
      Sharad

  6. Rene Avatar

    Thank you very much, I had the exact same problem and your article helped me to solve it.

    1. sharad chhetri Avatar

      You are welcome Rene,

      Your comment is essential, it helps many readers to try this post once for solution.

      Regards
      Sharad

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: