How to automate a daily backup of our MySQL database - table structure and data
We need to set up a daily backup of one of MySQL databases that we manage. This is currently hosted and we access it using Heidi SQL.
There is no scheduler in Heidi.
Looking into this further, the general advice seems to be to use mysqldump for scheduled backups and that we'd do that with an automatic Windows task and mysqldump.exe from the MySQL server using the following syntax:
mysqldump.exe -hYourIpOrHost -uYourUserName -pYourPassword yourdatabase >c:\path\to\backupfile.sql
Is this the best way to do this? We basically need to ensure that if a worst-case scenario occurs, that we can immediately restore the database, and data, from the previous day's backup.
I'm also not familiar with creating automatic Windows tasks.
Any advice/guidance would be greatly appreciated. Thank you.
NJ