給root用戶授予遠程登陸權限:
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
給被連接的數據庫(lucky)授予遠程登陸的權限:
GRANT ALL ON lucky.* TO 'root'@'%';
權限刷新:
FLUSH PRIVILEGES;
說明:如果連接發生錯誤要關閉服務器防火牆
給root用戶授予遠程登陸權限:
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;
給被連接的數據庫(lucky)授予遠程登陸的權限:
GRANT ALL ON lucky.* TO 'root'@'%';
權限刷新:
FLUSH PRIVILEGES;
說明:如果連接發生錯誤要關閉服務器防火牆