I have a MySql database that I want to backup to a file daily. (Which I will later download for off-server backup).
I have set up the following command in my crontab (ran daily):
mysqldump -–opt -Q -h [myhost] -u myusername -–password=***** ebooklibrary > /fullpath.../_db_backups/openelibrary.sql
The database name is ebooklibrary.
I am constantly getting this error:
mysqldump: Got error: 1045: Access denied for user 'myusername'@'126.96.36.199' (using password: NO) when trying to connect
How can I fix this, or do it properly, so that mysqldump will run daily?
Using the shell, the following command worked:
mysql -h myhost -u myusername -p"*****" ebooklibrary