Simple 2 server system with proxysql frontend:
Server1 (Master)Server2 (Slave)ProxySQL
mysql> select * from mysql_servers;+--------------+------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+| hostgroup_id | hostname | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |+--------------+------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+| 0 | Server1 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | || 0 | Server2 | 3306 | OFFLINE_HARD | 1 | 0 | 1000 | 0 | 0 | 0 | || 1 | Server2 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | |+--------------+------------+------+--------------+--------+-------------+-----------------+---------------------+---------+----------------+---------+3 rows in set (0.00 sec)mysql> delete from mysql_servers where hostgroup_id=0 and hostname='Server2';Query OK, 1 row affected (0.00 sec)mysql> select * from mysql_servers;+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+| hostgroup_id | hostname | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+| 0 | Server1 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | || 1 | Server2 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | |+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+2 rows in set (0.00 sec)mysql> select * from runtime_mysql_servers;+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+| hostgroup_id | hostname | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+| 0 | Server1 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | || 0 | Server2 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | || 1 | Server2 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | |+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+3 rows in set (0.00 sec)mysql> LOAD MYSQL SERVERS TO RUNTIME;Query OK, 0 rows affected (0.00 sec)mysql> select * from runtime_mysql_servers;+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+| hostgroup_id | hostname | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+| 0 | Server1 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | || 0 | Server2 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | || 1 | Server2 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | |+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+3 rows in set (0.00 sec)mysql> select * from mysql_servers;+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+| hostgroup_id | hostname | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+| 0 | Server1 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | || 0 | Server2 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | || 1 | Server2 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | |+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+3 rows in set (0.00 sec)
2016-10-17 21:58:28 [INFO] Received LOAD MYSQL SERVERS TO RUNTIME commandHID: 0 , address: Server1 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 0 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 1 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:2016-10-17 21:58:28 MySQL_HostGroups_Manager.cpp:362:commit(): [WARNING] Removed server at address 139895843905792, hostgroup 0, address Server2 port 3306. Setting status OFFLINE HARD and immediately dropping all free connections. Used connections will be dropped when trying to use themHID: 0 , address: Server1 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 0 , address: Server2 , port: 3306 , weight: 1 , status: OFFLINE_HARD , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 1 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 0 , address: Server1 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 0 , address: Server2 , port: 3306 , weight: 1 , status: OFFLINE_HARD , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 1 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:2016-10-17 21:58:28 [INFO] New mysql_replication_hostgroups tablewriter_hostgroup: 0 , reader_hostgroup: 1, (null)HID: 0 , address: Server1 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 1 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 0 , address: Server1 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 1 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 0 , address: Server1 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 1 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 0 , address: Server1 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 0 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 1 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:2016-10-17 21:58:29 [INFO] New mysql_replication_hostgroups tablewriter_hostgroup: 0 , reader_hostgroup: 1, (null)HID: 0 , address: Server1 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 0 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:HID: 1 , address: Server2 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 1000 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0 , comment:
--
You received this message because you are subscribed to the Google Groups "proxysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.