[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: postfix not connecting to mysql



>
> I am trying to set up postfix to use mysql, and I seem to be having a few
> issues. Here are some of the errors I am getting.
>
> May 13 10:10:39 debian postfix/trivial-rewrite[942]: warning: connect to
> mysql server localhost: Can't connect to local MySQL server through socket
> '/var/run/mysqld/mysqld.sock' (2)
> May 13 10:10:39 debian postfix/trivial-rewrite[942]: fatal:
> mysql:/etc/postfix/mysql-virtual.cf: table lookup problem
> May 13 10:10:40 debian postfix/master[720]: warning: process
> /usr/lib/postfix/trivial-rewrite pid 942 exit status 1
> May 13 10:10:40 debian postfix/master[720]: warning:
> /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
>
> Here is a copy of my mysql-virtual.cf file.
>
> # the user name and password to log into the mysql server
> hosts = localhost
> user = mail
> password = secret
>
> # the database name on the servers
> dbname = mail
>
> # the table name
> table = virtual
>
> #
> select_field = dest
> where_field = alias
> additional_conditions = and status = '1'
>
> any idea why it is not connecting? I have also tried using
> unix:/var/run/mysqld/mysqld.sock for the server with the same results.
>
>

Hi :-),

did you make sure your User has the rights to connect properly? Most of the
times, a User is made under MYSQL but has no rights to modify tables, enter
databases, or sometimes it's because the user is only allowed to connect
from localhost.

Got webmin? Good, makes it much easier.... :-)

Go to webmin https://yuor.server.here:10000 under servers, mysql server and
make sure to enter your previously build user to have the proper user and
database rights.

go to global options - user rights: what does it say there?

is the USER allowed to connect from any HOST and has PERMISSIONS set to ALL?

after that check the DATABASE PERMISSION

does the USER have permission to connect from ANY HOST and PERMISSON is set
to ALL?

after that check the HOST PERMISSION

does the USER on LOCALHOST really have PERMISSION set to ALL?


Just some ideas, had some similar problems in the past :-)
Simmel



Reply to: