Mysql授權遠程登錄
錯誤原因:
...null, message from server: "Host 'XXX' is not allowed to connect t
操作步驟:
第一步:打開mql鏈接工具,參考下圖:
第二步:找到要設置授權的數據庫,點擊查詢,新建查詢,如下圖:
第三步:輸入授權指令
1 grant all privileges on *.* to '用戶名'@'%' identified by '登錄密碼' with grant option; 2 3 /** 4 *例如:grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option; 5 **/
1 flush privileges;
第四步:測試,授權成功,問題已解決