[CentOS] CentOS 5.1 - MySQL 5.0.22 - Courier auth lib problem

Fri Mar 21 22:07:12 UTC 2008
Tom Brown <tom at ng23.net>


I am finishing my mail server config and just trying to get the mysql 
login working - it fails to connect and thorws the following error

Mar 21 21:58:21 mail0 authdaemond: failed to connect to mysql server 
(server=localhost, userid=courier): Can't connect to local MySQL server 
through socket '/tmp/mysql.sock.' (2)
Mar 21 21:58:21 mail0 couriertcpd: LOGIN FAILED, user=tom at xxx.xxx, 
Mar 21 21:58:21 mail0 couriertcpd: authentication error: Input/output error

The socket exists

# ll /tmp/mysql.sock
srwxrwxrwx 1 mysql mysql 0 Mar 21 21:53 /tmp/mysql.sock

and mysql seems to be working fine using the same credentials

# mysql -S /tmp/mysql.sock -u courier -pxxxxxx
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 5.0.22

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


some bits from the my.cnf

port        = 3306
socket        = /tmp/mysql.sock

port        = 3306
datadir        = /var/lib/mysql
socket        = /tmp/mysql.sock

any ideas as i am a bit stumped