MySQL The user specified as a definer ('root'@'%') does not exist 异常的解决方案

重装了mysql,项目运行遇到该异常,记录一下解决的办法:

  1. 登录mysql
  2. 执行赋权限操作,然后刷新权限
mysql >grant all privileges on *.* to root@"%" identified by "Passwd" ; 
mysql >flush privileges;
若您觉得我的博文对您有帮助,欢迎点击下方按钮对我打赏
打赏