[Dovecot] problems connecting to the Problems connecting to mysql
Adrian Vasile
yoyo at opennet.ro
Wed Jan 4 11:07:36 EET 2006
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
>>
>>
>>
>
>
More information about the dovecot
mailing list