i use openbsd/i386, dovecot-cvs(today), mysql-5.0.18
today, i change the mysql_dbuser_password form OLD_PASSWORD to PASSWORD
then dovecot can't connect to mysql-server
shell$> mysql -u root -p
mysql$> SET PASSWORD FOR 'db_user'@'localhost' =
PASSWORD('db_pw');
now, dovecot CAN NOT connect to mysql-server
shell$> mysql -u root -p
mysql$> SET PASSWORD FOR 'db_user'@'localhost' =
OLD_PASSWORD('db_pw');
now, dovecot CAN connect to mysql-server and everything work fine
i patched src/lib-sql/driver-mysql.c to test, use something like:
i_error("host(%s), db->user(%s), db->password(%s), db->dbname(%s)
....);
before mysql_real_connect(), then see the maillog, the
db->user/password/dbname is correct
maillog:
auth-worker(default): conn->mysql is NOT NULL
auth-worker(default): host((null)), db->user(db_user),
db->password(db_pw), db->dbname(dbname), db->port(0),
unix_socket(/mysql.sock), db->client_flags(0)
auth-worker(default): failed: (1)
auth-worker(default): mysql: Connect failed to (null) (dbname): Access
denied for user 'db_user'@'localhost' (using password: YES) -
waiting
for 1 seconds before retry
i wrote a small c program to test, it can success connect to mysql,
use same user/password/dbname, with both OLD_PASSWORD/PASSWORD
why dovecot can't to connect to mysql-server with PASSWORD?
help please, thank you
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dovecot.conf
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20060207/7f052073/attachment.pl>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dovecot-sql.conf
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20060207/7f052073/attachment-0001.pl>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-src_lib-sql_driver-mysql_c
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20060207/7f052073/attachment-0002.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sql-connect.c
Type: text/x-csrc
Size: 1096 bytes
Desc: not available
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20060207/7f052073/attachment.bin>