最近从正式环境导入整个db,查看view是提示

The user specified as a definer ('root'@'%') does not exist

解析:
权限问题,授权 给 root 所有sql 权限
解决方法:

mysql> grant all privileges on *.* to root@"%" identified by ".";
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

yanping
24 声望0 粉丝