Project History Legacy/usr/lib/mysql all data files, before using Debian under the mysql5.1 MyISAM engine, now the machine is Ubuntu, only the mysql5.5,mysql5.6 default InnoDB engine, the process of recovery.
Install mysql5.5 on 1.Ubuntu, copy all data files under/usr/lib/mysql to the corresponding directories in Ubuntu system, and set file permissions and owner.
Start sudo service MySQL start
Error,/var/log/mysql/error.log all kinds of file write, create errors.
Turning the default engine from InnoDB to MyISAM requires a reboot, and the MySQL process restarts unsuccessfully. Show engines; There is no good way.
2. mysql5.1 backup required database from Debian, mysql5.5 recovery on Ubuntu.
Mysqldump-u Root-p[password] Db_sth > Db_sth.sql
Error: Mysqldump:got error:1286:unknown table engine ' InnoDB ' when using LOCK TABLES
Mysql-u Root-p[password]
Use Db_sth;
Show tables;
Check Table:check table table1; Until error, {msg_type:error, Msg_text:unknown table engine ' InnoDB ' corrupt}
Repair table table1; The error is the same.
MY.CNF configuration DataDir, look for the directory under the file Db_sth/table1.frm (table format), Db_sth/table1. MYD (MyData), Db_sth/table1. MYI (Myindex), found Table1. MYD and Table1. MYI have been lost. So it cannot be repair and command myisamchk is not available.
drop TABLE table1;
Mysqldump-u Root-p[password] Db_sth > Db_sth.sql
Get the backup file. Table1 This table cannot be recovered.
MySQL Backup data migration, error handling