I've got dovecot v0.99.14, MySql 4.1.11 and postfix on fedora core 4…
when using uxix socket I get:
dovecot-auth: MySQL: Can't connect to database vmail: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

when using tcp socket I get:
dovecot-auth: MySQL: Can't connect to database vmail: Can't create TCP/IP socket (13)

* the mysql.sock exists
* I can connect to mysql -u vmail and select on the table mailbox
* I can run mysqladmin successfully using the port or the socket

As you can see below I modified the password query to be very simple.
I am surprised to get the error on startup since the password query should not be executed at this point.

The problem is not MySql as I am able to query all day long the the vmail database table called mailbox with the vmail user.

Not sure what else I can check
Dovecot error message lacks the reason it can not connect - unless the (13) means anything to anybody???
Anybody have any ideas???

dovecot.conf :

auth_assdb = mysql /etc/dovecot-mysql.conf

dovecot-mysql.conf :
db_host = localhost
db_unix_socket = /var/lib/mysql/mysql.sock
#db_port = 3306
db = vmail
db_user = vmail
db_passdb = temp
password_query = SELECT 'test' as password from mailbox


vmail.sql:
create database vmail;
use vmail;
grant insert,select,update,delete on vmail.* to 'vmail'@'localhost' identified by 'temp';
CREATE TABLE mailbox (
        user            varchar(20) not null,
        domain  varchar(30) not null,
        password        varchar(20) not null,
        status  char,
        PRIMARY KEY (user,domain)
);

insert into mailbox values('someone',   'domain.org',   'secret',       'Y');