您的位置:首页 > 数据库 > SQL

mysqldump Got error: 1449

2015-06-07 20:22 495 查看
在使用语句:

mysqldump -uroot -ppwd123 testdb > dump0607.sql

备份mysql数据库时出现错误:

Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES.

需要给root用户添加一个对全部host都可以访问的权限。

具体操作:

先登录mysql

mysql -uroot -ppwd123;

mysql> grant all privileges on *.* to root@"%"identified by "pwd123"

mysql> flush privileges;

再次执行备份语句就能成功备份了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql 备份