Hi,
I want to back up my mysql database once a week
How would I be able to do it using cron jons?
Hi,
I want to back up my mysql database once a week
How would I be able to do it using cron jons?
Mysql backup can be schedule using mysqldump through cron.
Below is the example.
* * * * * mysqldump -u USERNAME -pPASSWORD database > database_backup.sql
Set the days as per your requirements.
Mitul
where does it save the SQL file?
You can specify any location and the SQL file will be saved there.
mysqldump -u USERNAME -pPASSWORD database > /path/to/sql/file/database_backup.sql
mysqldump -u USERNAME -pPASSWORD database > /path/to/sql/file/database_backup.sql
Enter password: mysqldump: Got error: 1045: Access denied for user 'vlad_u'@'localhost' (using password: NO) when trying to connect
Please hellp me