Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for detecting mysql running information

A technology for operating information and detection units, which is applied in the computer field, and can solve problems such as the inability to detect information, the inability of information detection devices to connect to MySQL, and the difficulty of high-reliability MySQL cluster monitoring and operation of devices, so as to achieve the effect of improving continuity and stability

Active Publication Date: 2018-04-06
SHENZHEN TENCENT COMP SYST CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] 1) When the MySQL load of the target system is high, it will fail to detect information
The reason is that when the MySQL load of the target system is high, the information detection device cannot connect to MySQL, and thus cannot detect information
[0011] 2) When the system network concurrency installed on the device is huge, it will also fail to detect information
Therefore, the device for detecting MySQL operation information based on short connections is difficult to be used in high-reliability MySQL cluster monitoring operations

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 mysql running information
  • Method and device for detecting mysql running information
  • Method and device for detecting mysql running information

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0031] The method for detecting MySQL running information in this embodiment, such as figure 1 As shown, the following steps are performed periodically:

[0032] Step S101, confirming that the MySQL to be detected has been connected;

[0033] Step S102, sending a detection request based on the MySQL protocol to the MySQL to be detected;

[0034] Step S103, cache the result returned by MySQL to be detected,

[0035] Step S104 , while periodically executing the above steps, monitor the detection request, and when the detection request is detected, search and return the detection result of the previous period from the cache.

[0036] In order to improve detection reliability, this embodiment adopts a long connection method to overcome the defects existing in the traditional short connection method. The so-called long connection refers to a TCP connection that maintains a session for a long time. In this embodiment, it specifically means that after the connection with MySQL is ...

Embodiment 2

[0039] The method for detecting MySQL running information in this embodiment periodically executes the following steps:

[0040] Step S101, confirming that the MySQL to be detected has been connected;

[0041] Step S102, sending a detection request based on the MySQL protocol to the MySQL to be detected;

[0042] Step S103, cache the result returned by MySQL to be detected;

[0043] Step S104 , while periodically executing the above steps, monitor the detection request, and when the detection request is detected, search and return the detection result of the previous period from the cache.

[0044] When there are multiple MySQL instances to be detected, this embodiment establishes a detection task for each MySQL instance to be detected, and each detection task is responsible for detecting the corresponding MySQL instance when the time period arrives, and caches the detection results . When step S104 is executed to monitor the detection request from the client, the detection...

Embodiment 3

[0047] In order to further improve the method of detecting MySQL running information, such as figure 2 As shown, this embodiment responds to several abnormal situations that may occur during the execution process, and the steps of this embodiment are as follows.

[0048] Step S101, confirming that the MySQL to be detected has been connected;

[0049] Step S102, sending a detection request based on the MySQL protocol to the MySQL to be detected;

[0050] Step S103, cache the result returned by MySQL to be detected;

[0051] Step S104, while periodically executing the above steps S101-S103, monitor the detection request, and when the detection request is detected, find and return the detection result of the previous cycle from the cache;

[0052] Step S105, in the process of executing step S101 to confirm that the MySQL to be detected has been connected, if it is found that the MySQL to be detected is not connected, try to connect until it succeeds;

[0053] Step S106, in th...

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 and a device for detecting MySQL operation information. The long connection method is used to periodically detect MySQL, and the detection results of each cycle are cached. When a detection request is received, the detection results are extracted from the cache. . Therefore, when the MySQL load to be detected is high or the network concurrency of the system where the device is located is large, normal detection can also be guaranteed, which improves the continuity and stability of detection, and is especially suitable for the monitoring and operation of MySQL clusters that require high reliability.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a method and a device for detecting MySQL operation information. Background technique [0002] SQL (Structured Query Language) is a database query and programming language for accessing data and managing relational database systems. [0003] MySQL is a small relational database management system, developed by Swedish MySQL AB (acquired by SUN in January 2008, acquired by Oracle in 2009, and currently belongs to Oracle). Relational databases store data in different tables based on the relational data model, instead of putting all data in a large warehouse, which has flexibility while maintaining access speed. [0004] The traditional devices for detecting MySQL running information, including the tools provided by the MySQL standard installation package, all adopt the implementation method based on short connections. The main mechanism based on short connection is as follows: ...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/30
Inventor 李宇
Owner SHENZHEN TENCENT COMP SYST CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products