I have a fresh install of Centos 5.5 on a new VPS and MySQL seems unable to resolve the keyword 'localhost' - if I use 127.0.0.1 instead it works fine. I checked the /etc/hosts file which is as follows:
# Auto-generated hostname. Please do not remove this comment.
xxx.xxx.xxx.xxx 224136.xxxxxxxx.com localhost 224136 224136 localhost.localdomain
127.0.0.1 localhost
(I added the last line myself)...but still the localhost keyword isn't recognised. For example when I try to connect to my MySQL server using Navicat over SSH tunnel I get an error:
1130 - Host 'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server
any ideas what might be the problem, thanks