您的位置:首页 > 数据库 > MySQL

mysql不允许远程登录

2014-09-14 21:49 393 查看
刚安装好的mysql不允许从远程登录,只能在localhost。

此时,在localhost上登录数据库,将“user”表里的“host”项从“localhost”改为“%”,远程就可以使用"ems sql manager for mysql"等客户端工具进行连接了。

 



mysql>use mysql;

mysql>select host from user where user='root';

mysql>update user set host='%' where user='root' and host='localhost';

mysql>flush privileges;

 
 
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: