MySQL-Router 8.0.17 Linux integration and Group Replication metadata refresh

By | September 9, 2019

The MySQL Router is evolving quickly, seemingly following fast in areas that matter for InnoDB Cluster.

traffic routing – green means go!

For instance, this blog post from Jan Kneschke in MySQL-Router 8.0.16 an http webserver was added to support monitoring and management of the router instance.  The webserver stages the way for those things at least, which is great next step in that area.


Log handling via logrotate support and important handling for InnoDB Cluster related improvements in the router’s configuration metadata when it comes to single-primary and multi-primary mode topologies.

What to Know about MySQL-Router for your Cluster Solutions

Killer GR Feature in 8.0.17

Worth noting here, and I want to make sure people use it.


  • When enabled, Router refreshes metadata on each of the four notifications that Group Replication sends:
    • group_replication/membership/quorum_loss
    • group_replication/membership/view
    • group_replication/status/role_change
    • group_replication/status/state_change

This means that as your InnoDB Cluster topology changes, the MySQL-Router will adjust with it.  This is really how it should work – and its a fantastic addition to MySQL InnoDB Cluster landscape.

Navigating MySQL-Router OS Integration [on OL/RHEL 7.7]

I wanted to highlight getting mysqlrouter implemented and ensure users know to bootstrap the cluster with the some specific parameters in order to remove the guess work out of this, and instead just get building application with InnoDB Clusters.

It might be best to look through the routing_strategies to see which one works best for a given application.

Bootstrap and Operationalize MySQL-Router

The very first thing that we do is install MySQL – and these days if you are using InnoDB Cluster, it is a give-in that you’ll install mysqlrouter.  You’ll also notice I use the mysqlsh utility pretty exclusively too.  It might be a seperate download but its worth it.

We can see that the mysqlrouter system user is in place, so I’m inclined to re-use that OS user for my router implementations.

Additionally I want to emphasize the usage of the --conf-use-gr-notifications  in the boostrap command to get that setting in there from the start.

Now to finish the setup, let’s get systemctl setup to manage the router


I’m also a big fan of confirming what I expect to have done, has actually been done.  Let’s check the network ports that are active for MySQL and the mysql-router.

Now to test that MySQL-Router follows the InnoDB Cluster’s topology properly.

A recycle the MySQL Instance host “ic1c” which will cause a new RW primary will take over, and will be reflected in the router’s targeting.

Implementing Logrotate for MySQL-Router

In reviewing the worklog for implementing log rotation, it is simple enough to add in a log rotation setup in the same file that MySQL Server uses for log rotation.  In fact I’ve done that in the past by including the mysql-monitor-agent’s log rotation there too.

It is worth noting here a worklog for implementing logging in general with MySQL-Router.  Hopefully it is helpful for readers.


Thank you for using MySQL-Router!!!! 🙂



One thought on “MySQL-Router 8.0.17 Linux integration and Group Replication metadata refresh

  1. Pingback: InnoDB Cluster, Managing Async Integration – Select All From MySQL

Comments are closed.