Mysql Migration error
Directly copy and migrate the mysql directory, the process is not detailed, the database starts normally, but cannot be used normally, the select lookup table report does not exist, and then the log error is found as follows
InnoDB: Doing recovery: scanned up to log sequence number 265335480935
170504 15:56:39 InnoDB: Error: page 311313 log sequence number 265338125392
InnoDB: is in the future! Current system log sequence number 265335480935.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files
Solution:
Add under [mysqld] in / etc/my.cnf file
Innodb_force_recovery = 4
Restart mysqld back to normal, problem solved, remember to delete "innodb_force_recovery = 4" and restart again, otherwise there will be problems.
Some instructions about innodb_force_recovery
Innodb_force_recovery can be set to 1-6, and large numbers contain the effects of all previous numbers.
1. (SRV_FORCE_IGNORE_CORRUPT): ignore checked corrupt pages.
2. (SRV_FORCE_NO_BACKGROUND): blocking the running of the main thread, if the main thread needs to perform full purge operations, will result in crash.
3. (SRV_FORCE_NO_TRX_UNDO): no transaction rollback operation is performed.
4. (SRV_FORCE_NO_IBUF_MERGE): merge operations that insert buffers are not performed.
5. (SRV_FORCE_NO_UNDO_LOG_SCAN): without viewing the redo log, the InnoDB storage engine treats uncommitted transactions as committed.
6. (SRV_FORCE_NO_LOG_REDO): roll forward is not performed.