homestead+vagrant 環境下 MySQL 錯誤1449 : The user specified as a definer ('root'@'%') does not exist 解決方

權限問題,受權 給 root  全部sql 權限mysql

1:命令行登陸Mysql:「輸入mysql -u賬號 -p密碼。sql

例如:命令行登錄:$ mysql -uhomestead -psecretide

2.輸入:grant all privileges on *.* to root@"%" identified by ".";命令行

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

3.輸入:flush privileges;登錄

顯示:Query OK, 0 rows affected (0.00 sec)權限

試一下應該能夠了。密碼

備註:homestead

mysql退出:mysql > exit;vi

相關文章
相關標籤/搜索