Failed to start MySQL Multi Server for instance 1

– Subject: Unit mysqld@1.service has begun start-up
– Defined-By: systemd
– Support: systemd-devel Info Page

– Unit mysqld@1.service has begun starting up.
Sep 13 20:18:31 cibilbndi.novalocal mysqld_multi[11347]: elseif should be elsif at /usr/bin/mysqld_multi line 352.
Sep 13 20:18:31 cibilbndi.novalocal mysqld_multi[11347]: syntax error at /usr/bin/mysqld_multi line 353, near “)
Sep 13 20:18:31 cibilbndi.novalocal mysqld_multi[11347]: {”
Sep 13 20:18:31 cibilbndi.novalocal mysqld_multi[11347]: syntax error at /usr/bin/mysqld_multi line 356, near “else”
Sep 13 20:18:31 cibilbndi.novalocal mysqld_multi[11347]: syntax error at /usr/bin/mysqld_multi line 404, near “}”
Sep 13 20:18:31 cibilbndi.novalocal mysqld_multi[11347]: Illegal declaration of subroutine main::stop_mysqlds at /usr/bin/mysqld_multi line 416.
Sep 13 20:18:31 cibilbndi.novalocal systemd[1]: mysqld@1.service: control process exited, code=exited status=255
Sep 13 20:18:31 cibilbndi.novalocal systemd[1]: Failed to start MySQL Multi Server for instance 1.
– Subject: Unit mysqld@1.service has failed
– Defined-By: systemd
– Support: systemd-devel Info Page

– Unit mysqld@1.service has failed.

– The result is failed.
Sep 13 20:18:31 cibilbndi.novalocal systemd[1]: Unit mysqld@1.service entered failed state.
Sep 13 20:18:31 cibilbndi.novalocal systemd[1]: mysqld@1.service failed.
Sep 13 20:18:31 cibilbndi.novalocal polkitd[799]: Unregistered Authentication Agent for unix-process:11341:212302 (system bus name :1.47, object path
Sep 13 20:18:31 cibilbndi.novalocal systemd[1]: mysqld@1.service holdoff time over, scheduling restart.
Sep 13 20:18:31 cibilbndi.novalocal systemd[1]: Cannot add dependency job for unit tmp.mount, ignoring: Unit is masked.
Sep 13 20:18:31 cibilbndi.novalocal systemd[1]: Stopped MySQL Multi Server for instance 1.
– Subject: Unit mysqld@1.service has finished shutting down
– Defined-By: systemd
– Support: systemd-devel Info Page

– Unit mysqld@1.service has finished shutting down.
Sep 13 20:18:31 cibilbndi.novalocal systemd[1]: Starting MySQL Multi Server for instance 1…

How to fix this error ?? the error occurred after the server update, with the yum update command. I have been updating the server in the same way for a year, and there was no problem before.

I upload /usr/bin/mysqld_multi file

What are you trying to do?

I had the same problem. It started after an update. The problem was on line 352 the line should be changed from:
elseif ("–defaults-group-suffix=" eq substr($options[$j], 0, 24))
to:
elsif ("–defaults-group-suffix=" eq substr($options[$j], 0, 24))

I had further problems with the mysqld_multi program and I thought I would share my solution incase it would help anyone else.

after removing the syntax error I noticed I couldn’t start any of my mysqld instances
In the error log, I have:

[ERROR] /usr/sbin/mysqld: unknown variable ‘defaults-group-suffix=mysqld1’

The only way to have my instances up, is to comment out the following code:

if (!$suffix_found)
{
$com.= " --defaults-group-suffix=";
$com.= $groups[$i];
}

This is not a real good solution , but it was the only way I could get it to work.