mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法

mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法

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

  1. 使用“Ctrl + R”组合键快速打开cmd窗口,并输入“cmd”命令,打开cmd窗口。

    mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
  2. 2

    使用“mysql -uroot -proot”命令可以连接到本地的mysql服务。

    mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
  3. 3

    使用“use mysql”命令,选择要使用的数据库,修改远程连接的基本信息,保存在mysql数据库中,因此使用mysql数据库。

    mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
  4. 4

    使用“GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;”命令可以更改远程连接的设置。

    mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
  5. 5

    使用“flush privileges;”命令刷新刚才修改的权限,使其生效。

    mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
  6. 6

    使用“select host,user from user;”查看修改是否成功。

    mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法