search
Homephp教程php手册最简便的MySql数据库备份方法MySQLdump第1/2页

最简便的MySql数据库备份方法MySQLdump第1/2页

Jun 13, 2016 pm 12:30 PM
mysqlusebackupdatabasemethodmostofSimpleconduct

使用MYSQL进行数据库备份,有很正规的数据库备份方法,同其他的数据库服务器有相同的概念,但有没有想过,MySQL会有更简捷的使用文件目录的备份方法,而且又快有好。 
一、数据备份捷径 

因为这个方法没有得到官方正式文档的验证,我们暂称为试验吧。 
目的:备份hostA主机中一个MySQL数据库TestA,并恢复到到hostB机中 

试验环境: 

操作系统:WinNT4.0,MySQL3.22.34,PHPMyAdmin 2.1.0 Chinaz 

在hostA中安装MySQL数据库并建立TestA数据库 
hostB机安装MySQL数据库,没有TestA数据库 

方法步骤: 

启动PHPMyAdmin察看HostA和HostB中的数据库列表,在HostB中没有TestA数据库 


找到HostA中MySQL的安装目录,并找到数据库目录data 


在我的试验环境中,这个目录是 

C:\MySQL\data 


找到对应数据库名称的子目录 

C:\MySQL\data\TestA 

粘贴拷贝到HostB的Data目录下,是HostA同HostB MySQL数据目录下的文件相同 

刷新HostB的PHPMyAdmin察看一下数据库列表,我们看到TestA已经出现,并且作查询修改等操作都正常,备份恢复恢复成功 

试验结论:MySQL的数据库可以通过文件形式保存,备份,恢复只要将相应文件目录恢复即可,无需使用其它工具备份。 

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools