MySQL Tutorial Database Tutorial Backup
Using the MySQL database, the most common and most important is the database backup, so we first introduced the database backup. For database backup, also very formal database backup method, with other database servers have the same concept, but have you ever thought that MySQL will have a simpler use of the file directory backup method, but also quick to have good (this method has not been the official official document verification, we tentatively called the Test bar).
Objective: To backup a MySQL database in the Hosta host Testa and revert to the HOSTB machine.
Test environment:
Operating system: winnt4.0,mysql3.22.34,php Tutorial MyAdmin 2.1.0;
Install MySQL database in hosta and establish Testa database;
HOSTB machine installed MySQL database, no testa database.
Method steps:
1, start phpMyAdmin to see the list of databases in Hosta and HostB, there is no Testa database in HostB;
2, find the hosta MySQL installation directory, and find the database directory data;
3, in my test environment, this directory is c:mysqldata;
4, find the corresponding database name subdirectory C:mysqldatatesta;
5, paste copy to the HOSTB of the data directory, is hosta with the HostB MySQL directory of the same files;
6, refresh HostB phpmyadmin look at the list of databases, we see that Testa has appeared, and make query modifications and other operations are normal, backup restore success.
Test conclusion: MySQL database can be saved, backed up, restored by file, as long as the corresponding file directory restore, no need to use other tools to back up.