操作系统是LINUX的
1:防火墙没关闭,会出现下面的情况
解决:
service iptables stop
2:你的账号不容许远程登录
解决:
1. 改表法(可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%")
c:/mysql/mysql server 5.1>mysql -u root -p
输入相应密码
mysql>use mysql;
mysql>show tables; (确认一下表user是否存在)
mysql>update user set host='%' where user='root';
mysql>quit
退出mysql
这里需要注意的可能会出现的问题:
MySQL> update user set host='%' where user = 'root';
ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
然后查看了下数据库的host信息如下:
MySQL> select host from user where user = 'root';
+-----------------------+
| host |
+-----------------------+
| % |
| 127.0.0.1 |
| localhost.localdomain |
+-----------------------+
3 rows in set (0.00 sec)
host已经有了%这个值,所以直接运行命令:
复制代码 代码如下:
MySQL>flush privileges;
再用MySQL administrator连接...成功!!