mysqldump的ERROR 1449的解决方法
当用mysqldump导出数据库时有时会出现问题,例如以下命令执行时:
1mysqldump -uroot -pPasswd DBName >/home/www/DB_Backup.sql
出错,显示:
1Got error: 1449: The user specified as a definer ('test'@'192.168.1.%') does not exist when using LOCK TABLES
其实上面的报错信息中已经说的很明白了,就是test用户没有lock tables的权限 ,对该用户增加 lock tables的权限就行了。
1mysql> GRANT select, lock tables ON dbname.* TO 'test'@'192.168.1.%'
2mysql> flush privileges;
再重新mysqldump,一切OK 。
注:具体grant权限时,要根据错误提示的用户和主机进行授权 。
捐赠本站(Donate)
如您感觉文章有用,可扫码捐赠本站!(If the article useful, you can scan the QR code to donate))
- Author: shisekong
- Link: https://blog.361way.com/mysql-error-1449/2686.html
- License: This work is under a 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. Kindly fulfill the requirements of the aforementioned License when adapting or creating a derivative of this work.