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

Method and device for detecting MySQL operation information

A technology for operating information and detecting requests, which is applied in the computer field, and can solve problems such as failure to detect information, information detection devices that cannot connect to MySQL, and devices that are difficult to monitor and operate with high-reliability MySQL clusters, so as to achieve the effect of improving continuity and stability

Active Publication Date: 2014-06-18
SHENZHEN TENCENT COMP SYST CO LTD
View PDF5 Cites 4 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 operation information
  • Method and device for detecting MySQL operation information
  • Method and device for detecting MySQL operation 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 method for detecting MySQL operation information includes: using a long connection mode to periodically detect the MySQL, caching the detection result of each period, and extracting the detection result from the cache when receiving a detection request. The method and the device for detecting MySQL operation information are capable of guaranteeing the normal detection even if the load of the MySQL to be detected is high or the concurrency of a system network with the device is large, enable the detection persistence and stability to be improved, and are especially suitable for the cluster monitoring operation of the MySQL with higher reliability requirement.

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
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