Skip to content

Instantly share code, notes, and snippets.

#
# /etc/xinetd.d/mysqlchk
#
service mysqlchk_write
{
flags = REUSE
socket_type = stream
port = 9200
wait = no
user = nobody
#!/bin/bash
#
# This script checks if a mysql server is healthy running on localhost. It will
# return:
#
# "HTTP/1.x 200 OK\r" (if mysql is running smoothly)
#
# - OR -
#
# "HTTP/1.x 500 Internal Server Error\r" (else)
# HAProxy configuration - haproxy-db.cfg
##
## FRONTEND ##
##
# Load-balanced IPs for DB writes and reads
#
frontend db_write
bind 172.16.0.50:3306