mysqldump账户需要什么权限?
1、mysqldump所需权限
2、最佳实践
create user dumper@'10.192.4.6' identified by 'ask.9_1bn;qqq=;u'; grant select,trigger,show view,lock tables,process,event,reload,replication client on *.* to dumper@'10.192.4.6';
备份表结构:
#备份表结构: mysqldump -udumper -p'ask.9_1bn;qqq=;u' -h 10.192.4.8 --set-gtid-purged=OFF --single-transaction --master-data=2 --lock-tables \
--triggers --routines --events --max_allowed_packet=67108864 -d -B test > test_nodata_`date +%Y%m%d`.sql
参数:--lock-tables 为解决 myisam 表一致性问题
喜欢请赞赏一下啦^_^
微信赞赏
![](https://oss-pic.oss-cn-hangzhou.aliyuncs.com/wepayrandom_380.jpg)
支付宝赞赏
![](https://oss-pic.oss-cn-hangzhou.aliyuncs.com/alipayrandom_380.jpg)