lammert - 8:57 am on Apr 25, 2010 (gmt 0)
The connection to the MySQL server is controlled in the my.cnf file. You can find it probably in your /etc directory. The [mysqld] section contains the settings used by the server when it starts up. The [client] section contains the settings for the mysql command-line client. In both sections there is a line:
These two lines in the [mysqld] and [client] section must be the same. Otherwise the client is unable to find the server.