MYSQL 5.6 mysqldump scheduled backup

1. Execution environment Operating system: linux redhat Database: MySQL 5.6 2. Backup planning 1. Data backup location /opt/www/back/database/pac/data 2. Backup log location /opt/www/back/database/pac/ logs 3. Shell script location /opt/soft/scripts/mysqldaiybak.sh 4. Perform full backup at 3:10 am every day 3. My.conf configuration backup user mysql5.6 is not allowed to directly enter the user name and password in the mysqldump command to execute Export, but it is allowed to configure the user password of mysqldump directly in my.conf. There is no need to display the input user password when executing the mysqldump command. Add the following configuration items at the end of /opt/soft/mysql/my.conf. [plain] view plain copy View the code slice on CODE derived to my code slice [mysqldump] user=mysql_backup_user_name password=mysql_packup_password Fourth, edit the shell script 1. Create a shell script mkdir /opt/soft/scripts/mysqldaiybak.sh 2. Give the shell script executable permission chmod 755 /opt/soft/scripts/mysqldaiybak.sh 3. Complete shell script [plain] view plain copy View code snippet on CODE Derive to my code snippet#!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326978381&siteId=291194637