in reply to Perl daemon script + MySQL
ESP sounds appropriate for this problem.
Failing that, I suggest reading the error message given by your script.