Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save davidlzs/fb750ca5cba11023d103ff0535deb7d5 to your computer and use it in GitHub Desktop.

Select an option

Save davidlzs/fb750ca5cba11023d103ff0535deb7d5 to your computer and use it in GitHub Desktop.
# open a bash to our test conainer
docker exec -it db_backend_switch_nose_1 bash
# in the bash shell connect to proxysql admin
mysql -usbtest1 -ppassword -hproxysql -P6032
# view the current query rules
SELECT destination_hostgroup,apply FROM mysql_query_rules WHERE username='sbtest1';
# swtich to hostgroup 20
UPDATE mysql_query_rules SET destination_hostgroup=20 WHERE username='sbtest1';
# apply the changes
LOAD MYSQL QUERY RULES TO RUNTIME;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment