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

是权限问题,授权 给 root  所有sql 权限

8.0以下的MySQL数据库可以这么写

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

flush privileges;

8.0以上就不能这样写


create user 'root'@'%' identified by '.'; 

grant all privileges on . to 'root'@'%';

当然如果有root用户MySQL8.0就只用运行下面的就可以了

赋予权限:grant 权限列表 on 数据库 to ‘用户名’@’访问主机’ ;

grant all privileges on *.* to 'root'@'%';
--赋予root所有权限

如果你觉得这篇内容对你挺有启发请点赞+关注

posted @ 2022-07-16 13:52  深山藏古客  阅读(0)  评论(0编辑  收藏  举报