What does your /etc/hosts says? is it recognizing/mapping your localhost or hostname to 127.0.0.1?
This error is definitely a connection error, so it is either Linux is somehow not properly configured/host name not being recognized.
Check that MySQL my.cnf has the "skip-networking" option enabled, and the /etc/hosts.allow and /etc/hosts.deny files. You should have a "mysqld: ALL" in hosts.allow and nothing preventing you to connect in /etc/hosts.deny