mysql 开启远程连接
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身份登录啦!
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/lisonghua/archive/2008/12/22/3583447.aspx