Contents
What is the default port for MySQL replication?
A and B are Master and slave whose default port is 3306. C and D are running in non-default ports 3360. A and C are in Master-Master replication mode. C and D are in Master-Slave setup.
Can a MySQL server replicate to a slave?
In others, successful SBR requires that any SQL features used be supported by both the master and the slave servers. For example, if you use a feature on the master server that is available only in MySQL 5.7 (or later), you cannot replicate to a slave that uses MySQL 5.6 (or earlier).
How to check the replication status of a slave?
The MASTER_HEARTBEAT_PERIOD setting on the source (set by the CHANGE MASTER TO statement) specifies the frequency of the heartbeat, which defaults to half of the connection timeout interval for the slave ( slave_net_timeout ). The Slave_last_heartbeat variable for SHOW STATUS shows when the replication slave last received a heartbeat signal.
What to look for in MySQL replication status report?
The key fields from the status report to examine are: Slave_IO_State: The current status of the slave. See Replication Replica I/O Thread States, and Replication Replica SQL Thread States, for more information. Slave_IO_Running: Whether the I/O thread for reading the source’s binary log is running.
How to change the Master port in MySQL?
Stop A and change the port in A to 3360 and start A. Stop B and change the port in B to 3360. Ensure skip slave start is set to true. Start B and run change master to master_port=3360 and start slave. In C, run the same as step 4.
When do I need to stop replication in MySQL?
For some of the options of the CHANGE MASTER TO statement, you must issue a STOP REPLICA | SLAVE statement prior to issuing a CHANGE MASTER TO statement (and a START REPLICA | SLAVE statement afterwards). Sometimes, you only need to stop the replication SQL thread or the replication I/O thread, not both: