1. 進入mysql命令界面,也可以用navicat 或其他連接數(shù)據(jù)庫客戶端使用loaclhost連接 ,輸入
select host,user from mysql.user;
2. 設置允許任意IP訪問蚓耽,執(zhí)行語句:
update mysql.user set host = '%' where user = 'root';
flush privileges;
連接成功
select host,user from mysql.user;
update mysql.user set host = '%' where user = 'root';
flush privileges;
連接成功