Connection method, device, equipment and storage medium of database cluster
A connection method and database technology, applied in the database field, can solve problems such as affecting the speed of database connection, and achieve the effect of preventing database overload and improving connection speed.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0049] figure 1 It is a flow chart of a method for connecting a database cluster provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation when a client connects to a database cluster. and / or software, and generally can be integrated in computers, servers and all terminals that can access the background database. Such as figure 1 As shown, the method specifically includes the following steps.
[0050] Step 110, the user equipment obtains the number of databases of the database cluster to be connected.
[0051] Wherein, the database cluster may be a virtual single database composed of two or more databases, so as to provide database services to clients. The number of databases is the number of databases included in the data cluster.
[0052] Optionally, before the user equipment obtains the number of databases of the database cluster to be connected, the following steps are further included: configuring the database connection address...
Embodiment 2
[0064] Figure 2a The flow chart of a database cluster connection method provided by Embodiment 2 of the present invention is based on the above embodiments, as shown in Figure 2a As shown, the method includes the following steps.
[0065] Step 210, configure the database connection address set in the setting configuration file.
[0066] Step 220, analyze the setting configuration file to obtain a database connection address set, and determine the number of databases to be connected to the database cluster according to the number of elements contained in the database connection address set.
[0067] Step 230 , judging whether it is the first time for the user equipment to establish a connection with the database cluster, if yes, execute step 240 , if not, execute step 250 .
[0068] In this embodiment, when configuring the database connection address set, a connection initial value is set, and the connection initial value can be set to -1. When the user equipment receives a...
Embodiment 3
[0083] image 3 It is a schematic structural diagram of a connection device for a database cluster provided by Embodiment 3 of the present invention. Such as image 3 As shown, the device includes: a database number acquisition module 310 , a target database connection address determination module 320 and a database cluster connection module 330 .
[0084] A database quantity acquisition module 310, configured to acquire the database quantity of the database cluster to be connected;
[0085] The target database connection address determination module 320 is used to determine the target database connection address according to the random number and the number of databases;
[0086] The database cluster connection module 330 is configured to connect to the database cluster according to the target database connection address.
[0087] Optionally, also include:
[0088] The database connection address set configuration module is used to configure the database connection addres...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


