MySQL Database Backup

Source: Internet
Author: User
Tags mysql tutorial

Mysql tutorial database tutorial backup

When using mysql databases, database backup is the most common and important. So we will first introduce database backup. Database Backup is also a formal database backup method. It shares the same concept with other database servers, but have you ever thought that mysql will have a simpler backup method using the file directory, and it's always better (this method has not been verified in the official documentation. We call it a test now ).

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, php tutorial myadmin 2.1.0;
Install the mysql database in hosta and create a testa database;
The mysql database is installed on the hostb and does not have the testa database.

Procedure:

1. Start phpmyadmin to check the database list in hosta and hostb, and there is no testa database in hostb;

2. Find the mysql installation directory in hosta and the database directory data;

3. In my test environment, the directory is c: mysqldata;

4. Find the subdirectory c: mysqldatatesta of the corresponding database name;

5. paste and copy the file to the data directory of hostb, which is the same as that of the data Directory of hostb mysql;

6. 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, backed up, and restored in the form of files. You only need to restore the corresponding file directories without using other tools for backup.

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.