首页 > 数据库技术 > 详细

Mysqldump 常用备份操作命令

时间:2017-04-19 10:30:06      阅读:300      评论:0      收藏:0      [点我收藏+]

1.1.1   备份操作

create user ‘backup’@’localhost’ identifiedby ‘’;

grant select, reload, lock tables,replication client, show view, event, view, process on *.* to‘backup’@’localhost’;

mysqldump –ubackup –p –master-data=2–single-transaction –routines –triggers –events mc_orderdb >mc_orderdb.sql   备份一个库

mysqldump –ubackup –p –master-data=2–single-transaction –routines –triggers –events mc_orderdb table_nametable_name…> xxx.sql 备份表

mysqldump –ubackup –p –master-data=1  –single-transaction –routines –triggers–events –all-databases > db.sql  备份整个实例

mysqldump –ubackup –p –master-data=2–single-transaction –routines –triggers –events –tab=’/xx/xxx’ mc_orderdb >xxx.sql  分表结构和数据分开备份

mysql需对/xx/xxx可写权限

mysqldump –ubackup –p –master-data=2–single-transaction –where=”order_id> 1000 and order_id <1050” mc_orderdbtable_name > xxx.sql  where条件的单表备份


Mysqldump 常用备份操作命令

原文:http://90sirdb.blog.51cto.com/8713279/1917203

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!