Postfix MySQL error

Discussion in 'Installation/Configuration' started by alleks, Aug 2, 2011.

  1. alleks

    alleks Member

    Hi folks, I've already searched the forum for an answer but none worked for me.

    I get this error in my mail log:

    Aug  2 11:16:31 orion postfix/proxymap[18942]: warning: connect to mysql server Access denied for user 'ispconfig'@'' (using password: NO)
    Aug  2 11:16:31 orion postfix/trivial-rewrite[19463]: fatal: proxy:mysql:/etc/postfix/,lock|fold_fix): table lookup problem
    I try to login manually with the user and password supplied in and everything runs smooth, but for some reason won't work by it self. What could it be?

    Btw: I have the amavis disabled!
  2. alleks

    alleks Member

    I don't know why is this happening. When I log in using this

    mysql -u ispconfig -ppassword

    Everything ok. But when I try to log in the way it shows in the error log, it fails:

    mysql -h -u ispconfig -ppassword

    cat /etc/hosts
    Code:       localhost.localdomain   localhost    server
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    what could I be doing wrong?
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    According to the error message, postfix does not sue a password for logging in. Please check the file /etc/postfix/ if the password for the ispconfig user is set there.

    Then please post the output of:

    netstat -tap | grep mysql

    and the content of the file /etc/mysql/my.cnf or /etc/my.cnf
  4. alleks

    alleks Member

    Sorry for the delay. I've fixed it, and here is the explication of it

    When I was trying to connect to mysql with the -h parameter set to
    mysql -u ispconfig  -pHAHA -h
    I was getting an error that I was not allowed to do so, but if I when I was setting the parameter -h to localhost everything was ok.

    Then I tried modifying all the files that were connecting to mysql for postfix and had the value hostname set to to localhost but still no success.

    After a while watching logs, searching on the interned I went to phpmyadmin and do some checking there and I noticed that ISPConfig's databases had the permissions set for user ispconfig on host localhost so what I did was to add the same use but with the host set to

    That is weird, because and localhost by default should resolv the same thing. I don't know why was that happening but I have fixed the way I just told you.

    Good luck if any1 else has this problem.

Share This Page