mysql报错1449错误_错误代码: 1449 The user specified as a definer (\'root\'@\'%\') does not exist-flyfreebsd-...

1、错误描述

D:\MySQL\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump --all-databases -uroot -p > all_databases.sql

Enter password: **************

mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') doe

s not exist when using LOCK TABLES

D:\MySQL\Program Files\MySQL\MySQL Server 5.6\bin>

D:\MySQL\Program Files\MySQL\MySQL Server 5.6\bin>

D:\MySQL\Program Files\MySQL\MySQL Server 5.6\bin>

D:\MySQL\Program Files\MySQL\MySQL Server 5.6\bin>

D:\MySQL\Program Files\MySQL\MySQL Server 5.6\bin>

D:\MySQL\Program Files\MySQL\MySQL Server 5.6\bin>

D:\MySQL\Program Files\MySQL\MySQL Server 5.6\bin>

2、错误原因

这是权限问题,授权给root的所有的SQL语句

3、解决办法

GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY ".";

FLUSH PRIVILEGES;

你可能感兴趣的:(mysql报错1449错误)