This is the script to automatically backup MySQL database using hosting cron feature and PHP.
For details and tutorials regarding the implementation,please refer to Developer Shed/Codewalkers/Web hosting tutorial. Link here:
And look for the related article (e.g. Backup and Restoring MySQL Database) on this topic that I wrote (author:Codex-m).
1.) Download script and configure connection parameters.
2.) Upload folder to server. It is recommended it should be above public_html folder (also known as “www” folder or “html” folder). The primary reason is to deny public access to the folder.
3.) Configure cron.
4.) Troubleshoot if necessary and download the MySQL database file.
Important: Use the following file permissions in your Linux server
1.) .htaccess – 644
2.) cronmysqlbackup folder – 755
3.) cronmysqlbackup.php -755
2.) PHP 5
3.) MySQL database 5.0
4.) Apache web server
5.) Paid hosting account (php function such as system are enabled).
Note: You cannot use this script under free hosting accounts. Also refer to the cronmysqlbackup.php script for detailed procedure (commented on the script).