homestead+vagrant 环境下 MySQL 错误1449 : The user specified as a definer ('root'@'%') does not exist 解决方法

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

1:命令行登录Mysql:“输入mysql -u帐号 -p密码。

例如:命令行登陆:$ mysql -uhomestead -psecret

2.输入:grant all privileges on *.* to root@"%" identified by ".";

显示:Query OK, 0 rows affected (0.00 sec)

3.输入:flush privileges;

显示:Query OK, 0 rows affected (0.00 sec)

试一下应该可以了。

备注:

mysql退出:mysql > exit;

猜你喜欢

转载自www.cnblogs.com/niushuangmeng/p/10860632.html