Mysql backup data migration, error handling, mysql backup data

Source: Internet
Author: User
Tags mysql backup

Mysql backup data migration, error handling, mysql backup data
All data files in/usr/lib/mysql are left behind in the project history. Previously, MyISAM engine of mysql5.1 In Debian was used. The current machine is ubuntu, and only mysql5.5 is used. mysql5.6 defaults to InnoDB engine, recovery process.


1. Install mysql5.5 on Ubuntu, copy all data files under/usr/lib/mysql to the corresponding directory in Ubuntu, and set file permissions and owner.
Start sudo service mysql start
Error:/var/log/mysql/error. log file write and creation errors.
To change the default engine from InnoDB to MyISAM, restart the mysql process. Show engines; no good way.


2. Back up the required database from mysql5.1 On Debian and recover from mysql5.5 on Ubuntu.


Mysqldump-u root-p [password] db_something> db_sth. SQL
Error: mysqldump: Got error: 1286: Unknown table engine 'innodb' when using LOCK TABLES


Mysql-u root-p [password]
Use db_something;
Show tables;


Check table one by one: check table table1; until an Error is reported, {Msg_type: Error, Msg_text: Unknown table engine 'innodb' before upt}
Repair table table1; the same error is reported.


My. in cnf, configure datadir and find the files db_things/table1.frm (table format), db_things/table1.MYD (MyData), db_things/table1.MYI (MyIndex) in the directory. Both table1.MYD and table1.MYI are lost. Therefore, repair is unavailable, and myisamchk cannot be used.


Drop table table1;
Mysqldump-u root-p [password] db_something> db_sth. SQL
Obtain the backup file. Table 1 cannot be recovered.

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.