different IP in error message than the one I set?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

different IP in error message than the one I set?

Post 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...
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I think the IP address it is showing might be your web server IP (maybe).
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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.
Post Reply