MailScanner and MySQL

shuttlebox shuttlebox at gmail.com
Tue Apr 25 13:10:07 IST 2006


On 4/25/06, Martin <martin.lyberg at gmail.com> wrote:
> 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?

The scripts are run in numerical order so MySQL should have a lower
number than MailScanner in your case. Look in /etc/rc3.d for Sxxmysql
and similar. My answer is based on Solaris, maybe Debian uses another
startup procedure.

--
/peter


More information about the MailScanner mailing list