[Dovecot] Dovecot 30.10.2005 CVS Snapshot: cannot connect to MySQL
Hello,
I've compiled nightly CVS snapshot and set it up to work with MySQL database: [...] auth default { mechanisms = plain user = root
passdb sql {
args = /usr/local/dovecot/etc/sql.conf
}
userdb sql {
args = /usr/local/dovecot/etc/sql.conf
}
}
sql.conf contains next line: connect = host=localhost dbname=exim user=exim password=xxx
After the start dovecot cannot connect to MySQL database: Oct 30 15:44:15 crow dovecot: Dovecot v1.0.alpha4 starting up Oct 30 15:44:17 crow dovecot: auth-worker(default): mysql: Connect failed to localhost (exim): Access denied for user 'exim'@'localhost' (using password: YES) - waiting for 1 seconds before retry Oct 30 15:44:17 crow dovecot: auth-worker(default): mysql: Connect failed to localhost (exim): Access denied for user 'exim'@'localhost' (using password: YES) - waiting for 5 seconds before retry
But I can connect with the same password: # mysql -u exim -p exim Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2227 to server version: 4.1.15
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show tables; +----------------+ | Tables_in_exim | +----------------+ | aliases | | domains | | users | +----------------+ 3 rows in set (0.00 sec)
mysql>
Any ideas? Thanks in advance, Alexander.
-- Kind Regards, Alexander Shikoff minotaur@crete.org.ua Mob.: +380 67 946 31 49
Am Sonntag, den 30.10.2005, 15:46 +0200 schrieb Alexander Shikoff:
Hello,
I've compiled nightly CVS snapshot and set it up to work with MySQL database: [...] auth default { mechanisms = plain user = root
passdb sql { args = /usr/local/dovecot/etc/sql.conf } userdb sql { args = /usr/local/dovecot/etc/sql.conf }
}
sql.conf contains next line: connect = host=localhost dbname=exim user=exim password=xxx
After the start dovecot cannot connect to MySQL database: Oct 30 15:44:15 crow dovecot: Dovecot v1.0.alpha4 starting up Oct 30 15:44:17 crow dovecot: auth-worker(default): mysql: Connect failed to localhost (exim): Access denied for user 'exim'@'localhost' (using password: YES) - waiting for 1 seconds before retry Oct 30 15:44:17 crow dovecot: auth-worker(default): mysql: Connect failed to localhost (exim): Access denied for user 'exim'@'localhost' (using password: YES) - waiting for 5 seconds before retry
But I can connect with the same password: # mysql -u exim -p exim Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
I am no dovecot expert, but could you also try it with
% mysql -uexim -pexim -hlocalhost
if you specify no -hlocalhost, the mysql client uses the hostname as the host to connect.
cheers
Udo Rader
-- BestSolution.at EDV Systemhaus GmbH http://www.bestsolution.at
On Sun, Oct 30, 2005 at 04:18:09PM +0100, Udo Rader wrote:
I am no dovecot expert, but could you also try it with
% mysql -uexim -pexim -hlocalhost
if you specify no -hlocalhost, the mysql client uses the hostname as the host to connect.
/usr/local/dovecot/etc>mysql -p -u exim -h localhost exim Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2329 to server version: 4.1.15
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
-- Kind Regards, Alexander Shikoff minotaur@crete.org.ua Mob.: +380 67 946 31 49
Alexander Shikoff wrote:
After the start dovecot cannot connect to MySQL database: Oct 30 15:44:15 crow dovecot: Dovecot v1.0.alpha4 starting up Oct 30 15:44:17 crow dovecot: auth-worker(default): mysql: Connect failed to localhost (exim): Access denied for user 'exim'@'localhost' (using password: YES) - waiting for 1 seconds before retry Oct 30 15:44:17 crow dovecot: auth-worker(default): mysql: Connect failed to localhost (exim): Access denied for user 'exim'@'localhost' (using password: YES) - waiting for 5 seconds before retry
But I can connect with the same password: # mysql -u exim -p exim
I was hit with same problem when I tested MySQL 5.0 server. As it turns out MySQL changed PASSWORD() format on 4.1 server but it seems that C API library still uses old password format. When I stored password with OLD_PASSWORD() function Dovecot can connect to 5.0 server just fine.
But I wonder why "mysql" shell client DOES work even with new password format.
More about PASSWORD() changes at
http://dev.mysql.com/doc/refman/5.0/en/password-hashing.html
-- Tomi Hakala
participants (3)
-
Alexander Shikoff
-
Tomi Hakala
-
Udo Rader