1. 進入mysql伺服器,mysql -u root -p 登入myql服務,SELECT user, host FROM mysql.user;看到root只允許localhost本機連線
2. 執行use mysql; update user set host = '%' where user = 'root'; 再次檢視user表,root允許所有ip連線
3.重新整理快取FLUSH PRIVILEGES;
1. 進入mysql伺服器,mysql -u root -p 登入myql服務,SELECT user, host FROM mysql.user;看到root只允許localhost本機連線
2. 執行use mysql; update user set host = '%' where user = 'root'; 再次檢視user表,root允許所有ip連線
3.重新整理快取FLUSH PRIVILEGES;