The user specified as a definer ('root'@'%') does not exist
数据库执行
mySQL8.0以下执行
grant all privileges on *.* to root@"%" identified by "." root添加访问视图的权限
flush privileges;刷新权限
mySQL8.0及以上
先创建用户
CREATE USER() 'root'@'%' IDENTIFIED by '密码';
用户授权
GRANT all privileges on *.* to 'root'@'%' ;