Home > Database > Mysql Tutorial > body text

mysql最简单的备份与还原_MySQL

WBOY
Release: 2016-06-01 13:44:38
Original
785 people have browsed it

bitsCN.com

 注意:不要在mysql中进行操作,要在cmd中直接操作。

 

备份:将名为taskone的数据库备份到指定位置下的指定文件中
mysqldump -h 127.0.0.1 -uroot -proot taskone > D:/taskone
 
还原:
第一步:在mysql中先建立好对应名字的数据库
第二步:
mysql -h 127.0.0.1 -uroot -proot taskone  
 
注意:
1.在还原时,要先建立好数据库,再还原里面的数据
2.备份出来的文件会按自己指定的名字存储,如果想看其内容,可以备份为:
Taskone.sql
如果备份时文件名是taskone,也可以把它改为taskone.sql

 

摘自:漂泊小柒的专栏

bitsCN.com
Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!