Managing MySQL Server with systemd Instances then are managed by normal systemd commands, such as: systemctl start mysqld@replica01 systemctl start mysqld@replica02 To enable instances to run at boot time, do this: systemctl enable mysqld@replica01 systemctl enable mysqld@replica02 Use of wildcards is also supported. For example, this command displays the status of all replica instances: systemctl status ’mysqld@replica*’ For management of multiple MySQL instances on the same machine, systemd automatically uses a different unit file: In the unit file,  %I  and  %i  reference the parameter passed in after the  @  marker and are used to manage the specific instance. For a command such as this: systemctl start mysqld@replica01 systemd starts the server using a command such as this: mysqld --defaults-group-suffix=@%I ... The result is that the  [server] ,  [mysqld] , and  [mysqld@replica01]  option groups are read and used for that instance of the service. On Debian platforms, AppArmor prevents the server from reading or writing  / var/lib/mysql-replica* , or anything other than the default locations. To address this, you must customize or disable the profile in  /etc/apparmor.d/ usr.sbin.mysqld . On Debian platforms, the packaging scripts for MySQL uninstallation cannot currently handle  mysqld@  instances. Before removing or upgrading the package, you must stop any extra instances manually first. Because  mysqld_safe  is not installed on platforms that use systemd to manage MySQL, options previously specified for that program (for example, in an  [mysqld_safe]  or  [safe_mysqld]  option group) must be specified another way: On systemd platforms, use of  [mysqld_safe]  and  [safe_mysqld]  option groups is not supported and may lead to unexpected behavior. 201 • mysqld@.service  rather than  mysqld.service  (RPM platforms) • mysql@.service  rather than  mysql.service  (Debian platforms) Note Note Migrating from mysqld_safe to systemd Note •Some  mysqld_safe  options are also understood by  mysqld  and can be moved from the [mysqld_safe]  or  [safe_mysqld]  option group to the  [mysqld]  group. This does  not  include  -- pid-file ,  --open-files-limit , or  --nice . To specify those options, use the  override.conf systemd file, described previously.