I just installed Postfix and configured it to use MySQL. It wasn't sending any emails out after I did that so I checked /var/log/mail.log and it came back with this:
postfix/trivial-rewrite: fatal: proxy:mysql:/etc/postfix/mysql-domains.cf(0,lock|fold_fix): table lookup problem postfix/cleanup: warning: AFCDC30437: virtual_alias_maps map lookup problem for firstname.lastname@example.org postfix/master: warning: process /usr/lib/postfix/trivial-rewrite pid 5282 exit status 1 postfix/proxymap: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (110)
In mysql-domains.cf I'm using:
I can connect to MySQL with this:
mysql -u postfixuser -p
But I can't connect this way:
mysql -u postfixuser -h 127.0.0.1 -p maildbname
Also when I run netstat -l it comes back with:
tcp 0 0 localhost:mysql *:* LISTEN
I've tried changing my hosts to:
But then I just get a socket error:
postfix/cleanup: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
I also have this set up in the MySQL config file:
bind-address = 127.0.0.1
Any idea what could be wrong?