Cron problem


I’ve written a perl script that I’m using to update a MySQL database. The script runs fine from the command line, but I receive the error message “DBI connect(‘;database=xcard’,‘user_name’,…) failed: Can’t connect to MySQL server on ‘’ (111) at /home/user_name/ line 14”

I’ve tried reading dreamhost’s documentation and I’ve tried changing the cron entry several times. Currently I’m trying to use Dreamhost’s Cron GUI. The entry I’m using looks like “/usr/local/bin/perl /home/ikari/user_name/”

I’ve substituted “user_name” for my user name and “” for my mysql subdomain.

Any help would be greatly appreciated.


Shouldn’t the database be asking for a password? I don’t see any mention of using a password in your message.



There is a password in the script, and the script does work properly when run from the command line. I’m guessing the password isn’t put into the error message.


That /home/ikari/user_name doesn’t look right. Mine shows up as /home/.blahblah/user_name, and the .blahblah part is unnecessary. It’s just a mount point that can be removed.

How about /home/user_name/



I was prepared to say that your suggestion wasn’t going to work, but upon editing crontab, it looks like it’s running fine now for about 6 hours. I could’ve sworn this was the first thing I tried…

Thanks so much for the help!