I’ve a two host groups, 10 running MySQL57 and 20 running MySQ8. We mirror all traffic from 5.7 to 8.
By default the routing is when we add users we set default host_group to 10.
We then have a rule to mirror the traffic:
select rule_id, active, destination_hostgroup, mirror_hostgroup, apply from runtime_mysql_query_rules;
+---------+--------+-----------------------+------------------+-------+
| rule_id | active | destination_hostgroup | mirror_hostgroup | apply |
+---------+--------+-----------------------+------------------+-------+
| 1 | 1 | 10 | 20 | 1 |
+---------+--------+-----------------------+------------------+-------+
1 row in set (0.00 sec)
ProxySQL Admin>
What is the easiest way to instead route all traffic to MySQL8 cluster, hostgroup 20?
Is there a way to do it using mysql_query_rules table or should we just update the default hostgroup in the mysql_users table?