Hi,
I have a problem with Mysql replication
I have 2 Database servers 1 Master and 1 Slave When Replication is running then Master and Slave are disconnected so that the data on the two servers is inconsistent, my question is
-
How can when Master and Slave are disconnected they can be reconnected automatically?
-
How to do if the data has been reconnected in the Master and Slave is consistent again?
-
Apart from replication, what methods can make the Mysql Database server High Availability, for example 1 DB Server is in Jakarta (DC) 1 Database server is in another country (DRC)? and how to implement it? all on premise Thank you
Hi @Riyon_Amisela thank you for posting to the Percona forums, welcome!!
- By default MySQL replicas (slaves) will automatically attempt to reconnect to their Primary (master/source). They do this by retrying their connections in the event of network failures, or host restarts etc. MySQL :: MySQL 8.0 Reference Manual :: 17.1.6.3 Replica Server Options and Variables
- If you have had your replica stopped for a while, simply starting replication should catch the replica up with the primary automatically. If you suspect you have changed data on the replica, you can use a tool such as pt-table-checksum in order to determine the breadth and scope of the data differences. pt-table-checksum — Percona Toolkit Documentation
- Using asynchronous replication is probably the best HA you can achieve if you have your databases in different countries. MySQL :: MySQL 8.0 Reference Manual :: 17 Replication
1 Like