Problems connected to local mysql

Symptom:
Running `mysql` gives:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Running `mysql -h “hostname”` works

Fix:
Add the following to /etc/hosts.allow
mysqld:127.0.0.1:ALLOW