日期:2014-05-16 浏览次数:20700 次
Host ’60-248-32-13.HINET-IP.hinet.net’ is not allowed to connect to this,出现这个错误的原因是权限问题。mysql的root用户默认不允许远程登录,主要是考虑到安全问题吧。在mysql库的user表中,记录了root用户只允许本机登录。可以通过查看user表的数据看出:
?
mysql> select host,user,password from user;
+-----------+------+-------------------------------------------+
| host ? ? ? | user | password ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
+-----------+------+-------------------------------------------+
| localhost | root | *E74858DB86EBA20BC33D0AECAE8A8108C56B17FA |
| cenos11g| root | ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| 127.0.0.1 | root | ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| ::1 ? ? ? ??| root | ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| localhost | ? ? ?| ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| cenos11g ?| ? ? ?| ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+----------- ?+------+-------------------------------------------+
by ’[password]’;
[username]:远程登入的使用者代码
[db_name]:表示欲开放给使用者的数据库称
[password]:远程登入的使用者密码
[ipadd]:IP地址或者IP反查后的DNS Name
?