So I have an IP Address 5x.2x.2xx.1xx I want to map to localhost. In my hosts file I have:
cat /etc/hosts
127.0.1.1 test test
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
5x.2x.2xx.1xx 127.0.0.1
What I want to accomplish is that when I connect in this machine to 5x.2x.2xx.1xx, I go to localhost.
What I really want is to connect to MySQL using
mysql -uroot 5x.2x.2xx.1xx -p and instead of pointing to that IP address I want to use the local MySQL server
At the time it isn't working since it stills redirect to the server's IP (5x.2x.2xx.1xx)
I've also tried: sudo service nscd restart with no luck