Hi,
I had a devil of a time compiling Dovecot with MySQL, but got it as follows:
MYSQL=/usr export CPPFLAGS="-I${MYSQL}/include -I${MYSQL}/lib -I/usr/local/ssl/ -I/usr/local/ssl/include/ " export LDFLAGS="-L${MYSQL}/lib -R${MYSQL}/lib -I${MYSQL}/include -I${MYSQL}/lib -L/usr/local/lib -L/usr/local/ssl/lib" export SSL_FLAGS="-I/usr/local/ssl/ -I/usr/local/ssl/include/" export SSL_LIBS="-L/usr/local/lib -L/usr/local/ssl/lib"
./configure --localstatedir=/var --with-mysql=/usr
...
Install prefix ...................... : /usr/local File offsets ........................ : 64bit I/O loop method ..................... : poll File change notification method ..... : dnotify Building with SSL support ........... : yes (OpenSSL) Building with IPv6 support .......... : yes Building with pop3 server ........... : yes Building with mail delivery agent .. : yes Building with user database modules . : static passdb passwd passwd-file checkpassword mysql (modules) Building with password lookup modules : passwd passwd-file shadow pam checkpassword mysql (modules)
This is basically for somebody who RPM'd MySQL into /usr . I also figured out the less you give ./configure the better off you are.
And...maybe you could help **me**.. :-)
If you could post a few samples of how to actually connect to MySQL that would be great, for some reason I STILL cannot connect to MySQL even though I know the user/pass works for my dovecot userid. I know MySQL is compiled into dovecot but still cannot get the connect to work.
I've tried:
my dovecot.conf:
auth default {
mechanisms = plain
passdb sql { args = /usr/local/etc/dovecot-mysql.conf }
userdb sql { args = /usr/local/etc/dovecot-mysql.conf } }
my dovecot-mysql.conf:
driver = mysql
connect = host=127.0.0.1 dbname=dovecot user=dovecot password=dovecot
port=3306
connect = host=mydomain dbname=dovecot user=postfix password=postfix
port=3306
connect = host=mydomain dbname=dovecot user=dovecot password=dovecot
port=3306
connect = host=localhost dbname=dovecot user=dovecot password=dovecot
port=3306
connect = host=/var/lib/mysql/mysql.sock dbname=dovecot user=dovecot
password=dovecot port=3306
I get:
Aug 26 10:45:35 dovecot: auth-worker(default_with_listener): mysql: Connect failed to (null) (dovecot): Access denied for user 'dovecot'@'localhost' (using password: YES) - waiting for 1 seconds before retry Aug 26 10:45:35 dovecot: auth-worker(default): mysql: Connect failed to (null) (dovecot): Access denied for user 'dovecot'@'localhost' (using password: YES) - waiting for 1 seconds before retry Aug 26 10:47:17 dovecot: Killed with signal 15 Aug 26 10:47:21 dovecot: auth-worker(default): mysql: Connect failed to (null) (dovecot): Access denied for user 'dovecot'@'localhost' (using password: YES) - waiting for 1 seconds before retry
Help!
Tim