[數據庫] - MySql容許用戶經過IP訪問

默認用戶是經過localhost訪問的。mysql

登錄mysql後,切換到mysql數據庫,修改user表中指定用戶的host字段內容。sql

USE mysql;
SELECT USER, HOST FROM USER WHERE USER ='root';
UPDATE USER SET HOST = '%'  WHERE USER ='root';
FLUSH PRIVILEGES;

或者數據庫

Grant all privileges on *.* to 'root'@'%' identified by '你的密碼' with grant option;
flush privileges;
相關文章
相關標籤/搜索