MySQL replication (Replication) works: The slave end is replicated through the network to the slave end by using the binlog of the master end, and then through the SQL thread to parse the logs in the Binlog and apply them to the database.
1) Physical environment
Master A 172.16.100.106
Slave B 172.16.100.108
2) configuration of Maser end
Build a MySQL user on the primary server to enable Telnet to the primary server from the server
Grant replication slave on *.* to ' David ' @ ' 172.16.100.108 ' identified by ' MySQL '
Edit the configuration file for the master server
/etc/my.cnf
Server-id = 1
Log-bin = Mysql-bin
Binlog-ignore = MySQL//mysql database is not synchronized
Binlog-ignore-db = Information_schema
BINLOG-DO-DB = firstdb//sync L database, default sync all databases
Create database Firstdb for new synchronized databases;
View the status of the primary database