MySQL 5.7 uses 5.6 of the backup data, causing the service to start failing

Source: Internet
Author: User

Failure Background:

5.6 of backup data was used on MySQL 5.7 today, resulting in service start failure


Error message: This is the first mistake

Log prompt: ' The Innodb_system data file './ibdata1 ' is

A different size 4864 pages (rounded down to MB)

than the 11264 pages specified in the. CNF file! '


Ideas:

Based on the first error message of the log, it may be the first error that caused the other error to occur.

Summarize:

Finally, the size of the IBDATA1 and IBDATA2 must be the same size as the existing two files.


Workaround:

1, VIM/ETC/MY.CNF

Innodb_data_file_path = Ibdata1:76m;ibdata2:100m:autoextend

Ibdata1 and Ibdata2 are the same size as the two files in the data directory.

2. Start the service

/etc/init.d/mysqld start


Problems encountered after service startup:

Finally the service is up, but the log also has a lot of errors, resulting in metadata-related operations can not be executed ....



log prompt:' performance_schema '. ' Session_variables ' does not exist and later suggests a structural error:

Mysql-workbench connecting to MySQL server ... Native table ' Performance_schema '. Session_variables ' has the wrong structure

This type of error is a blockbuster!


Summary: because 5.7 of MySQL uses 5.6mysql created tables, this causes the table structure to be incompatible.

So check the following table for compatibility with the current version and update the system library.


Workaround:

1. Input: mysql_upgrade-uroot-p123 #检查表与当前版本的兼容性, and update the system library

2. Restart MySQL service:/etc/init.d/mysqld restart

And then it's working fine.


MySQL 5.7 uses 5.6 of the backup data, causing the service to start failing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.