MailScanner and MySQL

Alex Neuman alex at nkpanama.com
Tue Apr 25 13:06:41 IST 2006


Martin escribió:
> Hi,
>
> This may be a little OT, but i noticed a problem today on my debian 
> testbox. I'm running Mailscanner, Postfix, Mailwatch and MySQL.
>
> When i reboot, MailScanner starts before MySQL, which gives me the 
> following error in the maillog:
>
> MailScanner[1658]: Unable to initialise database connection: Can't 
> connect to local MySQL server through socket 
> '/var/run/mysqld/mysqld.sock' (2)
>
> I have to restart mailscanner in order to get it to connect to MySQL. 
> Is there a easy way to either change start order of the services or 
> make a little script to check if mysql is running before starting 
> mailscanner?
>
> Thanks in advance.
>
> / Martin
>
Don't usually work with Debian, but with most distros services are 
started alphabetically or with scripts preceded by S01-S99. My guess is 
that Ma (in MailScanner) goes before My (in MySQL) - so you should 
probably look in some form of an /etc/rc type folder for these files.

For more info try:

http://www.debian.org/doc/debian-policy/ch-opersys.html
http://www.debian.org/doc/manuals/securing-debian-howto/ap-harden-step.en.html
http://floppix.ccai.com/rc.html
http://www.debian-administration.org/articles/212



More information about the MailScanner mailing list