如何讓mysql以root用戶遠程登陸mysql數(shù)據(jù)庫?
具體操作如下:
在本機先使用root用戶登錄mysql:
mysql -u root -p"youpassword"
進行授權操作:
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'youpassword' WITH GRANT OPTION;
重載授權表:
FLUSH PRIVILEGES;
退出mysql數(shù)據(jù)庫:
exit