I have a php script that creates a dump of MySQL and mails it out for back-up purposes. This script works fine when run through a browser, but unfortunately the MySQL dump aspect of it fails when run through a cron job (other parts of the script work, just the dump fails). I'm sure this is a permissions thing - cron doesn't have permission to do the MySQL command - but how do I fix it?
This is the command:
/usr/bin/mysqldump -umyusername -pmypassword --databases mydatabase | gzip > /var/www/vhosts/mydomain/httpdocs/backups/backup.sql.gz


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks