At 12:23 PM 3/4/02 -0800, you wrote:
I have a short PERL script that executes mysqlhotcopy which works fine from the command line when logged in as root. I put the root MySQL password in the /root/.my.cnf file. When the cron job runs (cron.daily) it fails using no password saying that root@localhost is not authorized. What gives? How do I get the cron job to recognized the .my.cnf file containing the password? jay
--Snip -- Hi Jay,I don't recognize the way that you are attempting to 'dump' the database. I'll take a look at that later today and see what gives.
The way I do it is I put the command 'mysqldump -u root --password=password database >> backupfile.sql' where the second password field is the actual password, database is the database you want to dump, and backupfile.sql is a textfile dump of the database, in a cron job run by root. Create the cron job with 'crontab -u root -e.'
Cheers, Glenn