The systemd unit file that ships with the MySQL Router 8.0 RPM’s will not automatically restart mysqlrouter on failure. It can be modifed to do so, though, by editing the file /usr/lib/systemd/system/mysqlrouter.service and adding this line:
Restart=on-failure Put it right after the "ExecStart" line, so that the file ooks like this: [Unit] Description=MySQL Router After=syslog.target After=network.target [Service] Type=simple User=mysqlrouter Group=mysqlrouter PIDFile=/var/run/mysqlrouter/mysqlrouter.pid ExecStart=/usr/bin/mysqlrouter -c /etc/mysqlrouter/mysqlrouter.conf Restart=on-failure PrivateTmp=true [Install] WantedBy=multi-user.target
To make the changes take effect, systemd must be told to reload the unit files. From the command line:
# systemctl daemon-reload
Note that it will not restart the router on a normal shutdown, but only if it dies unexpectedly. So, kill -9 will make it restart, but a regular shutdown or kill with no flags will not.