Page 1 of 1

different IP in error message than the one I set?

Posted: Wed Oct 11, 2006 1:22 pm
by Luke
This is very strange... the DSN I am using looks like this: mysql://user:pass@10.10.1.124/database
and in my error, it's reporting a different IP... why would it do that?
mysql wrote:Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'10.10.1.131' (using password: YES) in...

Posted: Wed Oct 11, 2006 1:25 pm
by RobertGonzalez
I think the IP address it is showing might be your web server IP (maybe).

Posted: Wed Oct 11, 2006 1:32 pm
by volka
certainly yes.
http://dev.mysql.com/doc/refman/5.1/en/privileges.html
MySQL considers both your hostname and username in identifying you because there is little reason to assume that a given username belongs to the same person everywhere on the Internet. For example, the user joe who connects from office.example.com need not be the same person as the user joe who connects from home.example.com. MySQL handles this by allowing you to distinguish users on different hosts that happen to have the same name: You can grant one set of privileges for connections by joe from office.example.com, and a different set of privileges for connections by joe from home.example.com.

Posted: Wed Oct 11, 2006 1:36 pm
by Luke
hmmm.. well I can log in to phpmyadmin with these credentials... ??

EDIT: OK, well now I can't. Must be my host messing with stuff... I guess I'll give them a call. This is pretty irritating. Things like this happen quite frequently it seems.