The iptables setting problem after mysql master-slave synchronization is enabled is that the two are performing master-slave mysql synchronization. My mysql Server version is 5.6.10, and mysql5.6 is used for master-slave synchronization, the official recommendation is to put the information in master.info in the database. There are already many examples of mysql master-slave synchronization in the master.info table in the mysql database. Now I am mainly talking about my problems, the master-slave synchronization settings are smooth. A brief description: Execute SQL flush tables with read lock in the master database; view the binlog record of the master database: show master status; back up the master database: 1. You can package the database: tar-zcvf/backup/mysql_dump.tar.gz/var/lib/mysql 2. You can use the mysql tool mysqldump: mysqldump -- user = root-h 127.0.0.1 -- databases test_repl -- default-character-set = utf8 -- lock-all-tables>/backup/test_repl. SQL Restore database 1 and tar packages from the database directly decompress the package to the directory where mysql stores the database, modify the file to the mysql permission. 2. Run mysqldump: mysql-uroot-p123456 <test_repl. SQL to restore the database, and set the synchronization information from the database: change master to master_host = 'master database ip ', master_user = 'synchronize user name', master_password = 'synchronize user password', master_port = 3306, master_log_file = 'Log file', master_log_pos = Location of the log file; start slave from the Database Synchronization Service; release the read locks of the primary database and run unlock tables on the primary database; run show slave status \ G on the database to check whether the slave Database Synchronization status is correct. The Master/slave server firewall is set on the master database. You only need to release mysql tcp to iptables-A-p tcp -- dport 3306. -j ACCEPT must simultaneously release tcp udp of mysql on the slave server: iptables-A-p tcp -- dport 3306-j ACCEPT iptables-A-p udp -- dport 3306-j ACCEPT so that the master-slave synchronization can run normally.