码迷,mamicode.com
首页 > 数据库 > 详细

如何对数据库进行备份

时间:2018-10-06 23:07:12      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:创建   nbsp   src   登录   就会   用户名   password   .com   http   

对数据库进行备份处理时不用进行登录 

mysqldump -u root -p test >c:/test.sql

enter password : root 

这样就可以对数据库 test进行备份 到c盘的test,sql 文件里

技术分享图片

 

root 是数据库用户名 也是密码

如何对数据进行回复

MySQL -u root -p test < c:/test.sql 

password root 

这样就可以了

恢复时需要创建一个空的数据库

 

技术分享图片

再次对数据库进行查询时  表格 就会出来

技术分享图片

 

如何对数据库进行备份

标签:创建   nbsp   src   登录   就会   用户名   password   .com   http   

原文地址:https://www.cnblogs.com/qmk-716/p/9748875.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!