Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,29 @@ While `GET` is a commonly-used method as it is considered a "safe" choice with m

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).
<Message type="tip">
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:
```
CREATE USER '<username>'@'<ip_of_haproxy|network_of_haproxy/netmask>'
/*!50701 WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 0 */
/*M!100201 MAX_STATEMENT_TIME 0.0001 */;
```
The user specified for the health check must be unlocked and authorized without a password.

For MySQL versions < 8.0:

```
CREATE USER '<USERNAME>'@'<IP_ADDRESS_LB>'
```

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:

```
mysql_native_password=ON
```

You can then create the user:

```
CREATE USER '<USERNAME>'@'<IP_ADDRESS_LB>' IDENTIFIED WITH mysql_native_password;
```
</Message>

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

### PGSQL
Expand Down
Loading