现在的位置: 首页 > 数据库 > 正文

mysql 无lock tables权限 报Access denied for user when using

2020年05月02日 数据库 ⁄ 共 303字 ⁄ 字号 评论关闭

普通用户备份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 备份
 
摘自 依恋的专栏

抱歉!评论已关闭.