Basic MySQL HA environment, for advanced and custom configurations see:
- ProxySQL - High performance, high availability, protocol aware proxy for MySQL
- Heartbeat - Monitor MySQL replication delay
- Orchestrator - MySQL high availability and replication management tool
- MySQL replication is setup with GTID
Start environment with
docker-compose pull
docker-compose up -d
If you wish to rebuild the images locally run:
docker-compose -f .docker-compose.yml-ci build
or
docker build mysql/ -t garutilorenzo/mysql-gtid-replication:latest
docker build heartbeat/ -t garutilorenzo/heartbeat:latest
ProxySQL
Via console:
docker-compose exec proxysql bash
root@proxysql:/# mysql -u admin -pproxysql -h 127.0.0.1 -P6032 -e \
'select * from stats_mysql_connection_pool;'
Orchestrator
Via web Browser:
Heartbeat
Via console:
docker-compose exec proxysql bash
root@proxysql:/# mysql -u super -Ap -h 127.0.0.1 -P3306 -e \
'select * from percona.heartbeat;'
Enter password:
NOTE: all the cluster's password are defined in grants/users.sql
docker-compose down -v