#1  
Old 2nd August 2011, 11:21
alleks alleks is offline
Senior Member
 
Join Date: Nov 2010
Posts: 157
Thanks: 9
Thanked 9 Times in 9 Posts
Default Postfix MySQL error

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

I get this error in my mail log:

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

Btw: I have the amavis disabled!
Reply With Quote
Sponsored Links
  #2  
Old 2nd August 2011, 13:06
alleks alleks is offline
Senior Member
 
Join Date: Nov 2010
Posts: 157
Thanks: 9
Thanked 9 Times in 9 Posts
Default

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 127.0.0.1 -u ispconfig -ppassword

cat /etc/hosts
Code:
127.0.0.1       localhost.localdomain   localhost
82.120.120.120  server.xyz.com    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?
Reply With Quote
  #3  
Old 2nd August 2011, 13:47
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,686
Thanks: 819
Thanked 5,318 Times in 4,171 Posts
Default

According to the error message, postfix does not sue a password for logging in. Please check the file /etc/postfix/mysql-virtual_domains.cf 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
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 17th August 2011, 13:34
alleks alleks is offline
Senior Member
 
Join Date: Nov 2010
Posts: 157
Thanks: 9
Thanked 9 Times in 9 Posts
 
Default

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 127.0.0.1
Code:
mysql -u ispconfig  -pHAHA -h 127.0.0.1
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 127.0.0.1 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 127.0.0.1.

That is weird, because 127.0.0.1 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.
Reply With Quote
The Following User Says Thank You to alleks For This Useful Post:
falko (18th August 2011)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPCONFIG 3 Email Content Filter jariasca Installation/Configuration 11 2nd August 2012 12:27
mail authentication failure - unknown user or password evok Installation/Configuration 9 16th October 2010 06:37
ERROR: Connection dropped by IMAP server. [Centos 5.4, courier imap,squirrel, etc] darevil HOWTO-Related Questions 7 9th June 2010 14:49
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 17:51
configuring IPTABLES firewall adityavpratap HOWTO-Related Questions 9 27th May 2006 21:42


All times are GMT +2. The time now is 10:25.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.