普通用户备份mysql 报错
无lock tables权限 报Access denied for user 'dbuser'@'localhost' to database 'db' when using LOCK TABLES
主要原因是该用户无lock tables 该权限,处理办法:
1. 给该普通用户赋予lock tables 权限,建议是删除该用户,重新用mysql命令建
2. 加上--skip-lock-tables即可
mysqldump -udbuser -p dbname --skip-lock-tables > dbname.sql
3. 使用root 备份
摘自 依恋的专栏
mysql 无lock tables权限 报Access denied for user when using
【上篇】MySQL远程连接ERROR 2003 (HY000):Can’t connect to MySQL serv
【下篇】MySQL错误:access denied for user ‘root’@'localhost’ usi
【下篇】MySQL错误:access denied for user ‘root’@'localhost’ usi