HAProxy Enterprise Documentation 1.8r2
MySQL Health Checks
HAProxy Enterprise can health check MySQL database servers version 3.22 and newer. The check is valid if the server responds with a successful result message. Two modes exist:
In the following example, we check a MySQL handshake by adding the option mysql-check
directive:
backend be_myapp
option mysql-check
server srv1 10.0.0.1:3306 check
server srv2 10.0.0.2:3306 check
Add a user
parameter to option mysql-check
for the health check probe to send a Client Authentication packet:
backend be_myapp
option mysql-check user hapee-lb
server srv1 10.0.0.1:3306 check
server srv2 10.0.0.2:3306 check
Next up
PostgreSQL Health Checks