The use specified as definer('root'@'%') does not exist的解决办法

两个表(员工表和部门表)中都有数据,但是点击视图查看数据的时候反而遇见这个问题,于是查询了一下资料解决办法如下:

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

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

即,用来提升一下root权限

原文地址:https://www.cnblogs.com/xiaoxiaomi/p/4276749.html