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