Method and device for detecting consistency of data of MySQL master and slave servers

A main server and server technology, which is applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve the problems affecting the response speed of the server to the user's business, misjudgment, server pressure, etc.

Active Publication Date: 2015-05-27
ALIBABA GRP HLDG LTD
View PDF3 Cites 38 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] First, the possibility of misjudgment cannot be fundamentally avoided
Because the master-slave is in the process of dynamic update, if the master and slave servers are busy (for example: in the case of a large number of update requests), the second query may

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for detecting consistency of data of MySQL master and slave servers
  • Method and device for detecting consistency of data of MySQL master and slave servers

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0079] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the application. However, the present application can be implemented in many other ways different from those described here, and those skilled in the art can make similar promotions without violating the connotation of the present application. Therefore, the present application is not limited by the specific implementation disclosed below.

[0080] Such as figure 1 as shown, figure 1 It is a flow chart of an embodiment of a method for MySQL master-slave server data consistency detection provided by this application, which is combined below figure 1 Be explained.

[0081] Step S101: Set the default storage engine of the master server and the slave server as the InnoDB storage engine.

[0082] Data in MySQL is stored in files (or in memory) using various techniques. Each of these technologies uses different storage mechanisms, indexing techniques, lock...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for detecting consistency of data of MySQL master and slave servers. The method comprises the steps of setting default storage engines of the master and slave servers to be InnoDB; performing special database operation in the master sever, wherein the operation is to be written into a binlog file of the master server; determining whether the current database operation to be written into the binlog file is the special database operation by the master server while writing into the binlog file; if so, exporting the master server data; determining whether the currently-performed database operation is the special database operation while reading and implementing content of the binlog file written in the master server through a sever; if so, exporting the slave server; determining whether the exported master server data are the same as the exported master slave data; if so, determining that the exported master server data are consistent to the exported master slave data. The invention further provides a device for detecting consistency of data of the MySQL master and slave servers. With the adoption of the method and device, whether the consistency of the master and slave servers data can be accurately detected at a time.

Description

technical field [0001] The application relates to the field of master-slave server data consistency detection, and specifically relates to a method for MySQL master-slave server data consistency detection; the application also provides a device for MySQL master-slave server data consistency detection. Background technique [0002] MySQL is a relational database management system that speeds up data access and improves flexibility by storing data in different tables instead of putting all data in one large warehouse. In order to achieve server load balancing and enhance the ability of the database system to resist disasters, the MySQL database system, like other popular database systems, also adopts a master-slave synchronization architecture, that is: the system includes two servers: the master server and from the server. The purpose of adopting the above-mentioned architectural approach has the following two aspects. First of all, only the data update operation can be imp...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F17/30
CPCG06F16/1734G06F16/1815G06F16/183
Inventor 林晓斌
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products