mysql client connection hostname question

TCCV picture TCCV · Jan 6, 2010 · Viewed 21k times · Source

Have a question that I can't seem to find an answer for. I am trying to connect to a remote database. I type in the following to my Ubuntu shell:

mysql -u test -h mysql.domain.com -p

mysql asks for my password and then outputs the following:

ERROR 1045 (28000): Access denied for user 'test'@'externalit.domain.com' (using password: YES)

The problem is that I am not on externalit. I am on a completely different host. I think that the server I am on was cloned from externalit, but I didn't set the server up. My question: does mysql have a conf file or other setting that may be automatically entering an incorrect hostname? Can I change this?

Answer

MBCook picture MBCook · Jan 6, 2010

That's the name that the server thinks goes with your IP address. It could be do to a DNS setting (it's trying a reverse-DNS), or something in the /etc/host file (mapping that IP to that host).