Recently when deploying the MySQL master-slave replication architecture, I encountered "Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work." This error message. That is, the same UUID is used in the master-slave architecture. Check the server_id system variable, it is already a different setting, what is the reason? What follows is a detailed description. 1. Error message mysql> show slave staus; Last_IO_Error: Fatal error:&nb
1.slave have equal MySQL server UUIDs
Introduction: Recently when deploying the MySQL master-slave replication architecture, I encountered "Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work." this error message. That is, the same UUID is used in the master-slave architecture. Check the server_id system variable, it is no longer
2.Use Innobackupex to quickly build (repair) MySQL master-slave architecture
Introduction: There are many ways to build MySQL master-slave. The traditional mysqldump method is one of the choices for many people. But for larger databases, this method is not an ideal choice. Use Xtrabackup to quickly and easily build or repair mysql master-slave architecture. This article describes using innobackupex to quickly build or repair a master-slave architecture. For reference.
3.Use innobackupex to build mysql master-slave architecture based on the slave library
Introduction: Using a relatively short length, detailed analysis, pseudo code, code and animation, we introduce quick sort and heap sort in detail, and analyze the algorithm ideas and complexity. Worth a look
4.Building gtid master-slave based on mysqldump
Introduction: When implementing the MySQL master-slave architecture During the process, you can use the mysqldump method to build the master-slave. Mysqldump has generated GTID related information during the backup process, that is, these GTIDs can be skipped. For unskipped GTIDs, the IO thread will copy them to the slave server and be executed by the SQL thread. This article mainly demonstrates how mysqldump builds mysql master-slave in GTID mode.
5.MySQL GTID error handling summary
Introduction: MySQL GTID is a product evolved on the basis of traditional mysql master-slave replication, which uses UUID plus transaction ID to ensure the uniqueness of each thing. This method of operation means that we no longer need to care about the so-called log_file and log_Pos, but simply tell the slave library which server to find the main library from. It simplifies the master-slave setup and failover process, and is safer and more reliable than traditional replication. Since GTIDs are continuous without holes, when data conflicts occur in the master-slave library, they can be skipped by injecting empty things. This article mainly describes the error handling method of GTID master-slave architecture.
6.mysqldump quickly builds a specific library master-slave architecture (GTID)
Introduction: For a MySQL database with a small amount of data to build a master-slave architecture, it is a good choice to use the mysqldump tool to implement it. Combined with the MySQL GTID feature, it makes high availability a breeze. This article is a supplement to building gtid master-slave based on mysqldump. It mainly introduces the implementation of GTID master-slave based on multi-repository level, that is, not the entire instance level. The following is a detailed description and examples of this article.
7.MySQL automatic failover tool--mysqlfailover
Introduction: mysqlfailover is an important high-availability command included in the MySQL utilities toolkit, which is used to perform health detection on the master-slave replication architecture and implement automatic failover. It will regularly detect the health status of each node at specified intervals. Once it captures that the master node is unavailable, it will trigger failover-related actions and automatically perform failover to the best slave server at the moment. At the same time, other slave nodes in the entire master-slave architecture will point to the new master node, automatically completing the master-slave topology update.
8.Solution to MySQL master-slave replication inconsistency
Introduction: Basically, for a slightly larger website, MySQL master-slave replication will be configured. On the one hand, the master-slave of MySQL is used to separate the reading and writing of the database. On the other hand, the stand-alone backup of MySQL itself is not very strong. Generally, the master-slave architecture is used to perform data backup on the slave.
9.Major failure caused by inconsistency between master and slave data! Please pay attention!
Introduction: Fault description: Master-slave architecture, after the master went down, it switched to the slave, and the result was from A lot of data was lost (the data consistency was not verified before the downtime). There was no delay in synchronization at that time. When the user logged in, it could not be verified in the database. The result was
10.Redis master-slave automatic failover
##Introduction: There is a problem with the persistence of the Redis master-slave architecture. That is to say, the conclusion of the previous test is that persistence needs to be configured on the main instance to ensure that data is not lost across instances. In this way, the main instance will inevitably
in the process of persisting data to the hard disk. [Related Q&A recommendations]:
mysql master-slave architecture, what should I do if the master server fails?
The above is the detailed content of Recommended 10 mysql master-slave architectures. For more information, please follow other related articles on the PHP Chinese website!