Create a backup folder for mysql automatic backup in linux: mkdir mysql_data_bak script file: touch autobackupmysql. sh www.bitsCN.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.bitsCN.com. 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: mkdir mysql_data_bak script file: touch autobackupmysql. sh www.bitsCN.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.bitsCN.com. 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.
Link: http://www.bitsCN.com/database/201301/186017.html