Alexander Shikoff
2005-Oct-30 15:47 UTC
[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
Udo Rader
2005-Oct-30 16:21 UTC
[Dovecot] Dovecot 30.10.2005 CVS Snapshot: cannot connect to MySQL
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 -AI 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
Tomi Hakala
2005-Nov-18 21:00 UTC
[Dovecot] Dovecot 30.10.2005 CVS Snapshot: cannot connect to MySQL
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 eximI 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