| Linode Forum https://forum.linode.com/ |
|
| Upgrading MySQL = Breaking Postfix https://forum.linode.com/viewtopic.php?f=11&t=2782 |
Page 1 of 1 |
| Author: | FyberOptic [ Sun Jun 24, 2007 12:42 pm ] |
| Post subject: | Upgrading MySQL = Breaking Postfix |
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! |
|
| Author: | FyberOptic [ Sun Jun 24, 2007 1:36 pm ] |
| Post subject: | |
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. |
|
| Author: | Ciaran [ Sat Jun 30, 2007 4:54 pm ] |
| Post subject: | |
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. |
|
| Author: | SteveG [ Mon Jul 02, 2007 3:01 pm ] |
| Post subject: | |
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. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|