Home > Backend Development > PHP Tutorial > The simplest MySql database backup method MySQLdump page 1/2_PHP tutorial

The simplest MySql database backup method MySQLdump page 1/2_PHP tutorial

WBOY
Release: 2016-07-21 15:54:14
Original
811 people have browsed it

There is a very formal database backup method using MYSQL, which has the same concept as other database servers. But have you ever thought that MySQL has a simpler backup method using file directories, which is faster and better.
1. Data backup shortcut

Because this method has not been verified by official documents, we will temporarily call it a trial.
Purpose: Back up a MySQL database TestA in hostA and restore it to hostB

Test environment:

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

Install MySQL database in hostA and create TestA database
HostB installs MySQL database and does not have TestA database

Method steps:

Start PHPMyAdmin to view HostA and Database list in HostB, there is no TestA database in HostB


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


In my test environment, This directory is

C:MySQLdata


Find the subdirectory corresponding to the database name

C:MySQLdataTestA

Paste and copy it to the Data directory of HostB Below, the files in the MySQL data directory of HostA and HostB are the same

Refresh HostB’s PHPMyAdmin and check the database list. We see that TestA has appeared, and operations such as query modification and other operations are normal, and the backup and recovery are successful

Test conclusion: MySQL database can be saved, backed up, and restored in the form of a file, as long as the corresponding file directory is restored, without the need to use other tools for backup.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318553.htmlTechArticleUsing MYSQL for database backup, there is a very formal database backup method, which has the same concept as other database servers. But have you ever thought that MySQL will have a simpler way to use file directories...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template