Stephen Satchell wrote: > On 11/03/2014 07:04 AM, Kurt Petersen wrote: > > Hi > > > > I've just installed Debian with Postfix and MySQL. Later I found out > > that I also needed the postfix-mysql package. > > > > I now get an error that Postfix cannot connect to > > /var/run/mysqld/mysqld.sock . > > > > Does anybody got a hint? > > > > Thanks! > > > > Kurt > > > > 1. Did you start MySQL? (That's my favorite bone-head blunder) > 2. After starting, is the socket at the path indicated? > 3. If not, does your MySQL implementation let you specify where to put > the socket? > 4. How about using the configuration capability in Postfix? From the > man page mysql_table: > > > MYSQL PARAMETERS > > hosts The hosts that Postfix will try to connect to and query from. > > Specify unix: for UNIX domain sockets, inet: for TCP > > connections (default). Example: > > hosts = host1.some.domain host2.some.domain:port > > hosts = unix:/file/name > > > > The hosts are tried in random order, with all connections > > over UNIX domain sockets being tried before those over > > TCP. The connections are automatically closed after being > > idle for about 1 minute, and are re-opened as necessary. > > Postfix versions 2.0 and earlier do not randomize the host > > order. > > > > NOTE: if you specify localhost as a hostname (even if you > > prefix it with inet:), MySQL will connect to the default > > UNIX domain socket. In order to instruct MySQL to connect to > > localhost over TCP you have to specify > > hosts = 127.0.0.1 > > So, from the documentation, the first fix to try is to get the path to > the socket right. The second fix to try is to specify 127.0.0.1:3306
How to "get the path right". I think that I have to connect from /var/run/mysqld/mysqld.sock to /var/spool/postfix/var/run/mysqld I couldn't make a link do. Thanks Kurt