如何对数据库进行备份

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

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 

这样就可以了

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

 

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

 

posted @ 2018-10-06 22:31  秦明科  阅读(836)  评论(0编辑  收藏  举报