Running MySQL Router with Fabric
I would strongly encourage you to try out InnoDB clusters if you haven’t yet:


http://mysqlserverteam.com/mysql-innodb-cluster-new-5-7-17-preview-release-on-labs-mysql-com/
http://mysqlserverteam.com/mysql-innodb-cluster-a-hands-on-tutorial/


That being said, this is how I had previously setup MySQL Router 2.0 to run as a daemon on my test machines–which are systemd (EL7) based–so that you have a working reference implementation. In this test setup, the username:password combination for Fabric was admin:admin

[root@hanode1 ~]# cat /etc/mysqlrouter/mysqlrouter.ini
#
# MySQL Router configuration file
#
# Documentation is available at
# http://dev.mysql.com/doc/mysql-router/en/

[DEFAULT]
logging_folder = /var/log/mysqlrouter/
plugin_folder = /usr/lib64/mysqlrouter
runtime_folder = /var/run/mysqlrouter
config_folder = /etc/mysqlrouter

[fabric_cache:lab]
address = 192.168.1.91
user = admin

# Routing into my Fabric managed cluster
# route to the current READ_WRITE / PRIMARY node
[routing:lab]
bind_address = 127.0.0.1:6600
destinations = fabric+cache://lab/group/hagroup
mode = read-write

# Routing into my Group Replication cluster
# route to the first available node
[routing:grouprepl]
bind_address = 127.0.0.1:7700
destinations = 192.168.1.92:3306,192.168.1.93:3306,192.168.1.94:3306
mode = read-write

[logger]
level = debug

[root@hanode1 ~]# cat /usr/lib/systemd/system/mysqlrouter.service
[Unit]
Description=MySQL Router
After=syslog.target
After=network.target
After=mysqlfabric.service

[Service]
Type=simple
User=mysql
Group=mysql

PIDFile=/var/run/mysqlrouter/mysqlrouter.pid

ExecStart=/bin/bash -c "echo 'admin' | mysqlrouter --config=/etc/mysqlrouter/mysqlrouter.ini"

Restart=on-failure

RestartPreventExitStatus=1

PrivateTmp=true

[Install]
WantedBy=multi-user.target

[root@hanode1 ~]#


Best Regards,

Matt