mysqldump: Got error: 1449: The user specified as a definer ('user'@'%') does not ex

Posted godfather007

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysqldump: Got error: 1449: The user specified as a definer ('user'@'%') does not ex相关的知识,希望对你有一定的参考价值。

报错:
一个库用mysqldump -u -p --opt --force -e --max_allowed_packet= --net_buffer_length= --databases备份时报错如下:mysqldump: Got error: 1449: The user specified as a definer (‘user‘@‘%‘) does not exist when using LOCK TABLES
解决:在网上查找别人的解决方法,大意是说数据库是从别的实例复制过来的,而复制时记录了原实例的用户,但是目前实例上并没有该用户,所以导致报错,我这个库确实是从别的实例复制过来的,网上的解决方法比较复杂,后面搜到一个英文网站的解决方法https://help.directadmin.com/item.php?id=453,在备份时加上--single-transaction参数即可。



以上是关于mysqldump: Got error: 1449: The user specified as a definer ('user'@'%') does not ex的主要内容,如果未能解决你的问题,请参考以下文章

mysqldump: Got error: 1102: Incorrect database nam

mysqldump Got error 1045 Access denied for user 'roor' 'l

(转)mysqldump: Got error: 1556: You can't use locks with log tables.

mysqldump: Got error: 1044: Access denied for user 'backupuser'@'%' to database '

mysqldump: Got error: 1449: The user specified as a definer ('user'@'%') does not ex

mysqldump: Got error: 1556: You can't use locks with log tables. when using LOCK TABLES