The simplest MySql database backup method MySQLdump page 1/2 _ PHP Tutorial

Source: Internet
Author: User
MySQLdump, the simplest MySql database backup method, page 12th. Using MYSQL for database backup has a very regular database backup method, which has the same concept as other database servers, but have you ever thought about it, mySQL will use files more easily to back up databases using MYSQL. it has a very formal database backup method. it has the same concept as other database servers, but have you ever thought about it, mySQL will have a simpler backup method using the file directory, and it will be faster and better.
I. data backup shortcuts

Because this method has not been verified in the official documentation, we call it a test.
Objective: to back up a MySQL database TestA in the hostA host and restore it to the hostB host

Test environment:

Operating system: WinNT4.0, MySQL3.22.34, PHPMyAdmin 2.1.0 Chinaz

Install MySQL database in hostA and create TestA database
The MySQL database is installed on the hostB machine, and there is no TestA database

Procedure:

Start PHPMyAdmin to check the database list in HostA and HostB. no TestA database exists in HostB.


Find the MySQL installation directory in HostA, and find the Database Directory data


In my test environment, this directory is

C: \ MySQL \ data


Find the subdirectory of the corresponding database name

C: \ MySQL \ data \ TestA

Paste and copy the file to the Data directory of HostB, which is the same as the file in the Data directory of HostB MySQL.

REFRESH The PHPMyAdmin of HostB and check the database list. we can see that TestA has appeared, and the query and modification operations are normal. the backup recovery is successful.

Test conclusion: MySQL databases can be stored in the form of files, backup, recovery as long as the corresponding file directory can be restored, no need to use other tools to back up.

...

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.