MySQL备份-mysqldump

一先建立备份账号

create user backup@localhost identified by pass4word;

二赋予权限

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

附加,查看创建表的语句

show create table table_name;

 三备份单个数据库

 mysqldump -ubackup -ppass4word --master-data=2 --single-transaction --routines --triggers --events tk_test >tk.sql

 

MySQL备份-mysqldump

上一篇:Android上用模板方法模式实现具有自动重用View功能的Adapter


下一篇:SQL之ASCLL码