Basic knowledge of MySQL Database Backup (1)

Source: Internet
Author: User

Guidance:We usually useMySQL databaseData is often lost due to operation errors. MySQL database backup can help us avoid data loss or other database problems caused by various reasons.Database BackupThe data loss problem can be solved. data in the database is backed up before the database operation. No matter what problems occur during the operation, the data in the database will not be lost, database Backup ensures data security in the database.

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 in the hostA host and restore it to the hostB

Test environment:

Operating System: WinNT4.0, Mysql3.22.34, and phpMyAdmin 2.1.0

Install MySQL database backup in hostA and create TestA Database

MySQL database backup is installed on the hostB, and no TestA database exists.

Procedure:

Start phpMyAdmin to check the database list in HostA and HostB. No TestA database exists in HostB.

Find the installation directory of MySQL database backup in HostA, and find the database directory data

In my test environment, the directory is C: \ mysql \ data

Find the subdirectory C: \ mysql \ data \ TestA of the corresponding database name

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

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.


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.