Ubuntu 10.10 Pentax K-5

Monday, August 15, 2011

Backup innoDB database of mysql

Two main types of databases in mysql: MyISAM and InnoDB.



mysql/data contains all the databases. Each database is shown as a folder.



For MyISAM, just copy the data folder under mysql.

For InnoDB, can't just copy the frm files under data folder. There is a need to copy the "ibdata1" which contains the table info.



Best practice: use the backup function to export the database to mysql, then import.

No comments: