Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: open
mysqldump -u DBUSER -p DBPASSWORD DBNAME > databasefile.sql
Also, that's not a fully formed crontab line, a full one might look like:
10 0 * * * cd /home/me/backups; /usr/bin/mysqldump --opt -u DBUSER -p DBPASS DBNAME > databasefile.sql
The --opt command is good for backing up databases, from the man file for crontab: "--opt Same as --add-drop-table --add-locks --all --extended-insert --quick --lock-tables".
Enter password: mysqldump: Got error: 1045: Access denied for user 'USER'@'localhost' (using password: NO) when trying to connect
you should enter as suggested by physics:
10 0 * * * cd /home/me/backups; /usr/bin/mysqldump --opt -u DBUSER -pDBPASS DBNAME > databasefile.sql
include the -p option and replace "DBPASS" with an actual password, since cron couldn't be bothered to provide one for you.
NO SPACE between "-p" and the password.
also make sure you replace "DBUSER" with a user that actually matches the provided password.