Skip to content

Commit 1053b26

Browse files
RoRoJjcirinosclwy
andauthored
fix(lb): fix mysql health check info (#4121)
* fix(lb): fix mysql health check info * Update network/load-balancer/reference-content/configuring-health-checks.mdx Co-authored-by: Jessica <[email protected]> --------- Co-authored-by: Jessica <[email protected]>
1 parent b3b59eb commit 1053b26

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

network/load-balancer/reference-content/configuring-health-checks.mdx

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,29 @@ While `GET` is a commonly-used method as it is considered a "safe" choice with m
4848

4949
For MYSQL health checks, you are prompted to select the database username. The MYSQL health check sends two MySQL packets to the server: first a Client Authentication packet and then a QUIT packet to properly close the MySQL session. The received MySQL Handshake Initialization packet (and/or Error packet) is then parsed. This basic but useful test does not produce errors or aborted connections on the server. However, bear in mind that it does not check database presence or database consistency (an external check e.g. with xinetd would be required for this).
5050
<Message type="tip">
51-
The user specified for the health check must be unlocked and authorized without a password. To create a basic limited user in MySQL with optional resource limits:
52-
```
53-
CREATE USER '<username>'@'<ip_of_haproxy|network_of_haproxy/netmask>'
54-
/*!50701 WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 0 */
55-
/*M!100201 MAX_STATEMENT_TIME 0.0001 */;
56-
```
51+
The user specified for the health check must be unlocked and authorized without a password.
52+
53+
For MySQL versions < 8.0:
54+
55+
```
56+
CREATE USER '<USERNAME>'@'<IP_ADDRESS_LB>'
57+
```
58+
59+
For MySQL versions >= 8.0 and < 9.0, the `mysql_native_password` authentication plugin is no longer enabled by default. Therefore you need to activate it with the following setting:
60+
61+
```
62+
mysql_native_password=ON
63+
```
64+
65+
You can then create the user:
66+
67+
```
68+
CREATE USER '<USERNAME>'@'<IP_ADDRESS_LB>' IDENTIFIED WITH mysql_native_password;
69+
```
5770
</Message>
5871

5972
<Message type="important">
60-
This health check method requires MySQL >=3.22. For older versions, we recommend using a TCP health check.
73+
This health check method requires MySQL >= 3.22 or < 9.0 For older or newer versions, we recommend using a TCP health check.
6174
</Message>
6275

6376
### PGSQL

0 commit comments

Comments
 (0)