Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Jun 24, 2007 12:42 pm 
Offline
Junior Member

Joined: Thu Jun 16, 2005 12:28 pm
Posts: 33
I never realized this until today, but apparently ever since I upgraded MySQL to version 5 the other day, my courier/postfix setup has been broken. I noticed I had over 80mb of stuff in /var/spool/postfix/maildrop, and skimming over some of the files, found that the root of all the problems seems to be the lack of connecting to MySQL. For example:

postfix/trivial-rewrite[9071]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

Many of the errors are MySQL-related, or related to the other processes failing that wanted MySQL, so this is obviously my culprit. Now, I know upgrading from MySQL 4 to 5 did some things to the passwords, because I remember having an issue once before on a different server, where older clients weren't able to connect until I went in and manually set the MySQL passwords for the database(s) in question to support the older password style (with OLD_PASSWORD). But I remember that when I upgraded MySQL this time, it prompted me to do that, and upon looking in the database, all passwords appear to be using the older style.

I'm not as fluent in the workings of postfix as I want to be, so I'm not sure what all information I should post in regards to fixing this (aside from me running Debian Sarge), but I wanted to at least ask now as I continue to poke around trying to fix it, in case someone else has had a similar issue before. Thanks in advance!


Top
   
 Post subject:
PostPosted: Sun Jun 24, 2007 1:36 pm 
Offline
Junior Member

Joined: Thu Jun 16, 2005 12:28 pm
Posts: 33
Normally I'd delete my post since I already fixed the problem, but hey, it might help someone else.

I came to find that my chroot jail for Courier had the problem, for whatever reason. Despite it showing up in a 'mount', the directory I bound into there appeared empty when I'd try to list its contents. So I checked fstab to double-check:

/var/run/mysqld /var/spool/postfix/var/run/mysqld auto bind 0 0

Then unmounted it, mount-a, and it worked fine again. No idea what caused it to muck up.

Then I realized it's kind of stupid to keep relying on this roundabout method of talking to mysql in the first place. So I looked up info on Courier's /etc/courier/authmysqlrc, commented out MYSQL_SOCKET, added in a MYSQL_PORT to go with the MYSQL_SERVER, restarted Courier and postfix's daemons, but it doesn't seem to work. So I'm not sure what to do on that front to avoid using the socket, but at least it works again the original way.


Top
   
 Post subject:
PostPosted: Sat Jun 30, 2007 4:54 pm 
Offline
Senior Member

Joined: Fri Feb 13, 2004 11:30 am
Posts: 140
Location: England, UK
You might have 'skip-networking' in your MySQL config. If you do, then a socket is how you'd communicate with the MySQL server. You should probably use "bind-address = 127.0.0.1" instead.


Top
   
 Post subject:
PostPosted: Mon Jul 02, 2007 3:01 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
FyberOptic wrote:
/var/run/mysqld /var/spool/postfix/var/run/mysqld auto bind 0 0

Then unmounted it, mount-a, and it worked fine again. No idea what caused it to muck up.


At a guess, the mysql upgrade deleted and then recreated /var/run/mysqld. The bind mounted pointed at the old directory, while mysql was using the new one.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group