[Dovecot] problems connecting to the Problems connecting to mysql
dan at ipws.com
dan at ipws.com
Wed Jan 4 13:34:41 EET 2006
Adrian Vasile wrote:
> let me guess... the error is that mysql server has gone away?
> if this is the case, i solved this issue with .99 and if the reconnect
> method is the same in 1.0-alphaX then take a look at the mysql
> connection variable (it has a bit "connected") and then look at the
> dovecot mysql connection function in db-mysql*c
>
> there's a patch I posted earlier.
>
>
> Alfonso Fernandez wrote:
>
>> Thanks Timo, everything works fine for me now.
>>
>> But I'm not sure this is true: "MySQL changed PASSWORD() format on
>> 4.1 server but it seems that C
>>
>> API library still uses old password format"
>>
>> because the little program below connects to the database using the
>> new PASSWORD() format. So I think it has to be something related to
>> dovecot itself.
>>
>> #include <mysql.h>
>> #include <stdio.h>
>>
>> int main()
>> {
>> MYSQL mysql;
>> mysql_init(&mysql);
>> if
>> (mysql_real_connect(&mysql,"localhost","postfixuser","xxxxxx","postfix",0,NULL,0)
>> == NULL)
>> fprintf(stderr, "Failed to connect to database: Error: %s\n",
>> mysql_error(&mysql));
>> else
>> fprintf(stderr, "Connected to database\n");
>> }
>>
>> gcc p.c -I/usr/include/mysql -lmysqlclient
>>
>>
>>
>>
>> Timo Sirainen escribió:
>>
>>> On Fri, 2005-12-30 at 20:30 +0100, Alfonso Fernández Vázquez wrote:
>>>
>>>
>>>> I'm trying to setup a mailserver running postfix and dovecot with
>>>> mysql
>>>> as database backend. Postfix is already running and delivers mails
>>>> just
>>>> fine. Unfortunately, dovecot has great problems connecting to the
>>>> database (using username + password).
>>>>
>>>
>>>
>>>
>>> http://wiki.dovecot.org/MysqlProblems
>>>
>>>
>>>
>>
>>
>
>
Hi -
You guessed wrong, I'm sorry.
The error is rather generic - again, only stating that "password
authentication failed", no more, no less.
I did increase the maximum number of children and waiting processes for
Dovecot, and this actually seems to help. I suspect that "password
authentication failed" is a very generic error message used on purpose
because POP3 simply does not have any scope for more elaborate errors.
I think that if and when a new connection was made to the Dovecot
POP3/IMAP server, and it could not (for whatever reason) verify the
password, the generic error would be returned.
MySQL connections are minimal, and well above max_connections. Finding
this out was my first task.
Thanks for your help and time
-dant
More information about the dovecot
mailing list