Set mysql automatic backup in CentOS
Create backup Folder: mkdirmysql_data_bak script file: touch autobackupmysql. sh www.2cto.com open the file vi autobackupmysql. sh adds the following content to the script: filename = 'date + % Y % m % D'/usr/bin/mysqldump-uroot-proot boss>/home/mysql_data_bak/$ filename. crond is not installed in the SQL check. If no, install yum-y install vixie-cronyum-y install crontabs to start the service: service crond start www.2cto.com and add it to the CentOS System for Automatic start: chkconfig -- level 345 crond oncrontab-e: 00 03 *** source/root/autobackupmysql. sh runs this file at every day and backs up the database with service crond restart.
Create backup Folder: mkdirmysql_data_bak script file: touch autobackupmysql. sh www.2cto.com open the file vi autobackupmysql. sh adds the following content to the script: filename = 'date + % Y % m % D'/usr/bin/mysqldump-uroot-proot boss>/home/mysql_data_bak/$ filename. crond is not installed in the SQL check. If no, install yum-y install vixie-cronyum-y install crontabs to start the service: service crond start www.2cto.com and add it to the CentOS System for Automatic start: chkconfig -- level 345 crond oncrontab-e: 00 03 *** source/root/autobackupmysql. sh run this file at every day, back up the database service crond restart to complete the original link: http://www.2cto.com/database/201301/186017.html