zl程序教程

您现在的位置是:首页 >  其他

当前栏目

The user specified as a definer (‘root‘@‘%‘) does not exist(已解决)

2023-03-14 22:49:23 时间

The user specified as a definer ('root'@'%') does not exist 此种报错主要是针对访问视图文件引起的(没有权限)

按照下图进行操作

1.先看下mysql是否设置了环境变量,如果没设置,就需要切换到mysql的bin目录下执行命令(我的已经设置)

mysql -hlocalhost -uroot -p123456

2.给root用户添加权限

grant all privileges on *.* to root@"%" identified by ".";

3.刷新权限

flush privileges;

image