Skip to content

Commit 0645699

Browse files
author
Nirbhay Choubey
committed
MDEV-10145: Systemd fails to start mysqld in multi-instance mode
--defaults-xxx options must be placed before all other options in the command line. Also moved MYSQLD_OPTS at the end so that its options take precedence.
1 parent 2768829 commit 0645699

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

support-files/mariadb@.service.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,15 @@ PermissionsStartOnly=true
6464
# This isn't a replacement for my.cnf.
6565
# _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
6666

67-
ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER --defaults-file=@INSTALL_SYSCONF2DIR@/my%I.cnf
67+
# Note: Place $MYSQLD_OPTS at the very end for its options to take precedence.
68+
69+
ExecStart=/usr/sbin/mysqld --defaults-file=@INSTALL_SYSCONF2DIR@/my%I.cnf \
70+
$_WSREP_NEW_CLUSTER $MYSQLD_OPTS
6871
# Alternate: (remove ConditionPathExists above)
6972
# use [mysqld.INSTANCENAME] as sections in my.cnf
7073
#
71-
# ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS --defaults-group-suffix=%I
74+
# ExecStart=/usr/sbin/mysqld --defaults-group-suffix=%I \
75+
# $_WSREP_NEW_CLUSTER $MYSQLD_OPTS
7276

7377
KillMode=process
7478
KillSignal=SIGTERM

0 commit comments

Comments
 (0)