[Dovecot] Strange Mysql connect problem
Hi, I compiled Dovecot and Mysql on two different servers each with the same options. Dovecot connects successfully on Server B. Server A has this error in Dovecot trying to connect to Mysql:
dovecot: auth-worker(default): mysql: Connect failed to /tmp/mysql.sock (exim_db): Access denied for user 'user'@'localhost' (using password: YES) - waiting for 5 seconds before
Passwords are plain text.
Server A (64 bit amd with Ubuntu Hoary) info: ./mysql -V mysql Ver 14.7 Distrib 4.1.11, for unknown-linux-gnu (x86_64) ldd dovecot libmysqlclient.so.14 => /usr/local/mysql/lib/mysql/libmysqlclient.so.14 (0x0000002a9566c000) libc.so.6 => /lib/libc.so.6 (0x0000002a95881000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x0000002a95ac0000) libnsl.so.1 => /lib/libnsl.so.1 (0x0000002a95bf3000) libm.so.6 => /lib/libm.so.6 (0x0000002a95d09000) libz.so.0 => /usr/local/mysql/lib/mysql/libz.so.0 (0x0000002a95e90000) /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000) libpthread.so.0 => /lib/libpthread.so.0 (0x0000002a95fa4000) ./dovecot --version 1.0.rc7 More info -- The Mysql user name on A and B are the same and are correct. Other applications are connecting on A using the same credentials.
Server B info (Debian PIII): mysql Ver 14.7 Distrib 4.1.21, for pc-linux-gnu (i686) using EditLine wrapper ldd dovecot linux-gate.so.1 => (0xffffe000) libc.so.6 => /lib/tls/libc.so.6 (0x40020000) /lib/ld-linux.so.2 (0x40000000) ./dovecot --version 1.0.rc7
I have Googled and see lots of people having the same problem. I would rather not downgrade Mysql.
Why doesn't Dovecot connect on A?
Thanks. Craig
On Tue, 2006-10-10 at 21:37 -0500, Craig Jackson wrote:
Hi, I compiled Dovecot and Mysql on two different servers each with the same options. Dovecot connects successfully on Server B. Server A has this error in Dovecot trying to connect to Mysql:
dovecot: auth-worker(default): mysql: Connect failed to /tmp/mysql.sock (exim_db): Access denied for user 'user'@'localhost' (using password: YES) - waiting for 5 seconds before
I guess you mean this: http://wiki.dovecot.org/MysqlProblems
Well, that looks like a MySQL 'Access Denied' error rather than a Dovecot 'Access Denied' error so my guess is that your MySQL setup is wrong somewhere. Either you're using the wrong password, most likely IMHO, or you didn't Grant permission to that user in MySQL perhaps. Either way, it looks like it connecting to MySQL but then MySQL kicks you out.
Timo Sirainen wrote:
On Tue, 2006-10-10 at 21:37 -0500, Craig Jackson wrote:
Hi, I compiled Dovecot and Mysql on two different servers each with the same options. Dovecot connects successfully on Server B. Server A has this error in Dovecot trying to connect to Mysql:
dovecot: auth-worker(default): mysql: Connect failed to /tmp/mysql.sock (exim_db): Access denied for user 'user'@'localhost' (using password: YES) - waiting for 5 seconds before
I guess you mean this: http://wiki.dovecot.org/MysqlProblems
-----Original Message----- From: Timo Sirainen [mailto:tss@iki.fi] Sent: Wednesday, October 11, 2006 5:24 AM To: Craig Jackson Cc: dovecot@dovecot.org Subject: Re: [Dovecot] Strange Mysql connect problem
On Tue, 2006-10-10 at 21:37 -0500, Craig Jackson wrote:
Hi, I compiled Dovecot and Mysql on two different servers each with the same options. Dovecot connects successfully on Server B. Server A has this error in Dovecot trying to connect to Mysql:
dovecot: auth-worker(default): mysql: Connect failed to /tmp/mysql.sock (exim_db): Access denied for user 'user'@'localhost' (using password: YES) - waiting for 5 seconds before
I guess you mean this: http://wiki.dovecot.org/MysqlProblems
Yes, that fixed it. I had read the wiki page but dismissed it because we are using plain text passwords in that database. So I didn't think password encryption had anything to do with it.
Thank you very much, and thanks to others who replied. Have a good day.
Craig
On Wed, 2006-10-11 at 05:46 -0500, Craig Jackson wrote:
I guess you mean this: http://wiki.dovecot.org/MysqlProblems
Yes, that fixed it. I had read the wiki page but dismissed it because we are using plain text passwords in that database. So I didn't think password encryption had anything to do with it.
I finally thought I'd test this myself, so I upgraded my MySQL to 5.1 in Debian, created a new user with the new password format and made Dovecot connect to it. But it worked just fine..
Could someone give me access to a computer where this is actually broken so I could debug this?
On 2006-10-11 14:06:05 +0300, Timo Sirainen wrote:
On Wed, 2006-10-11 at 05:46 -0500, Craig Jackson wrote:
I guess you mean this: http://wiki.dovecot.org/MysqlProblems
Yes, that fixed it. I had read the wiki page but dismissed it because we are using plain text passwords in that database. So I didn't think password encryption had anything to do with it.
I finally thought I'd test this myself, so I upgraded my MySQL to 5.1 in Debian, created a new user with the new password format and made Dovecot connect to it. But it worked just fine..
Could someone give me access to a computer where this is actually broken so I could debug this?
ping me on irc.
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On Tue, 10 Oct 2006 21:37:57 -0500 "Craig Jackson" CJackson@abbott-simses.com wrote:
Hi, I compiled Dovecot and Mysql on two different servers each with the same options. Dovecot connects successfully on Server B. Server A has this error in Dovecot trying to connect to Mysql:
dovecot: auth-worker(default): mysql: Connect failed to /tmp/mysql.sock (exim_db): Access denied for user 'user'@'localhost' (using password: YES) - waiting for 5 seconds before
Does running this the command line mysql client (something like mysql -u user -h localhost -p exim_db) as the Dovecot user work? I'm guessing it won't and the message from the mysql client will be the same as above?
Have you tried making the logging on the DB more verbose? Often useful with MySQL I find. I see it is a production system though so that might not be possible.
Dominic
Passwords are plain text.
Server A (64 bit amd with Ubuntu Hoary) info: ./mysql -V mysql Ver 14.7 Distrib 4.1.11, for unknown-linux-gnu (x86_64) ldd dovecot libmysqlclient.so.14 => /usr/local/mysql/lib/mysql/libmysqlclient.so.14 (0x0000002a9566c000) libc.so.6 => /lib/libc.so.6 (0x0000002a95881000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x0000002a95ac0000) libnsl.so.1 => /lib/libnsl.so.1 (0x0000002a95bf3000) libm.so.6 => /lib/libm.so.6 (0x0000002a95d09000) libz.so.0 => /usr/local/mysql/lib/mysql/libz.so.0 (0x0000002a95e90000) /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000) libpthread.so.0 => /lib/libpthread.so.0 (0x0000002a95fa4000) ./dovecot --version 1.0.rc7 More info -- The Mysql user name on A and B are the same and are correct. Other applications are connecting on A using the same credentials.
Server B info (Debian PIII): mysql Ver 14.7 Distrib 4.1.21, for pc-linux-gnu (i686) using EditLine wrapper ldd dovecot linux-gate.so.1 => (0xffffe000) libc.so.6 => /lib/tls/libc.so.6 (0x40020000) /lib/ld-linux.so.2 (0x40000000) ./dovecot --version 1.0.rc7
I have Googled and see lots of people having the same problem. I would rather not downgrade Mysql.
Why doesn't Dovecot connect on A?
Thanks. Craig
participants (5)
-
Craig Jackson
-
Dominic Marks
-
Marcus Rueckert
-
Timo Sirainen
-
Tom