If you are trying to use a program to connect to MySQL (in my case, BugTracker, and you encounter the following problem:
This means that the program is trying to use TCP connections rather than sockets, despite using localhost as a configuration option. This is ridiculous, especially in a PHP environment, but we can easily get past it.
In the /etc/hosts file, make sure you have the following line:
It CANNOT be:
This fixed my problem.