/*------------------------1--------------------------*/
修改my.ini中的ip(如果有 localhost 修改为 ip)
/*------------------------2--------------------------*/
mysql -u root -p123
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;
/*------------------------3--------------------------*/
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION
//赋予任何主机访问数据的权限
mysql>FLUSH PRIVILEGES
//修改生效
mysql>EXIT
//退出MySQL服务器
posted on 2008-09-14 14:17
小咔咔 阅读(548)
评论(0) 编辑 收藏 所属分类:
SQL