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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com