Bug #67333 | access denied when conecting to a db | ||
---|---|---|---|
Submitted: | 23 Oct 2012 2:57 | Modified: | 2 Jul 2013 7:23 |
Reporter: | lynn01 lynn01 | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / Python | Severity: | S3 (Non-critical) |
Version: | OS: | Linux | |
Assigned to: | Geert Vanderkelen | CPU Architecture: | Any |
[23 Oct 2012 2:57]
lynn01 lynn01
[23 Oct 2012 3:00]
lynn01 lynn01
python 2.6 os centos 5 mysql 5.0.67 mysql-connector 1.0.6b2
[23 Oct 2012 3:51]
lynn01 lynn01
I have just find that the default host is 127.0.0.1, after I grant to user on this ip address it will be ok to connect. But If specify the host param in the connect fuction as host='localhost', it still connect to 127.0.0.1, the other user still connect to '%'. The host param is just not working.
[23 Oct 2012 4:24]
lynn01 lynn01
I have figure out that i have understand the host pram wrong. The final answer is this: mysql_conector seems to connect to mysqld as 127.0.0.1, I don't grant user auth on this ip, for /etc/hosts, there is also no localhost 127.0.0.1, so i don't know whether the server will do the reverse dns query. oursql seems to be still using localhost instead of 127.0.0.1, so there is no problem for it.
[30 May 2013 7:06]
jiang xiaobing
should close this issue?