Create USER 'itpro'@'%' IDENTIFIED BY '123';
1、d:\mysql\bin\>mysql -h localhost -u root
//這樣應該可以進入MySQL服務器
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;
2、mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION
//賦予任何主機訪問數據的權限
3、mysql>FLUSH PRIVILEGES
//修改生效
4、mysql>EXIT
//退出MySQL服務器
這樣就可以在其它任何的主機上以root身份登錄啦!
作者“兄弟無間”