Bug #82785 Cannot run multiple MySQL instances under systemd
Submitted: 29 Aug 2016 11:58 Modified: 15 May 2017 15:24
Reporter: Kevin Pattison Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S2 (Serious)
Version:5.7 OS:Ubuntu (16.04)
Assigned to: Lars Tangvald CPU Architecture:Any

[29 Aug 2016 11:58] Kevin Pattison
Description:
The documentation for running multiple instances of MySQL server in a systemd environment do not work (https://dev.mysql.com/doc/refman/5.7/en/server-management-using-systemd.html#systemd-multi...). Instead this is all that happens: http://forums.mysql.com/read.php?11,649641,649641#msg-649641

How to repeat:
Follow documentation exactly.
[29 Aug 2016 19:17] Terje Røsten
Hi and thanks for your report!

You are right, multi instance support in systemd is not implemented in .deb packages for Ubuntu and Debian yet, we hope to include this in future release.
[29 Aug 2016 20:28] Kevin Pattison
Thanks for the confirmation Terje,

Can you tell me is there any workaround that I can use as I URGENTLY need this to work. Are there any repositories that I could use that would have this support other than Ubuntu's own repositories? Or any patches I could apply?

I've already attempted to fall back to upstart on Ubuntu but that is not working either as it's now a legacy package in 16.04.
[29 Aug 2016 20:30] Kevin Pattison
When you say "is not implemented in .deb packages for Ubuntu and Debian yet" do you mean in the Ubuntu Repositories? Would it work if I were to use the MySQL deb repository here (https://dev.mysql.com/downloads/repo/apt/)?
[30 Aug 2016 4:49] Terje Røsten
None of the available .deb packages have multi instance support.

To make this work, something like the following file:

https://github.com/mysql/mysql-server/blob/5.7/scripts/systemd/mysqld%40.service.in

is needed, togther with changes to script mysqld_pre_systemd

ExecStartPre=@bindir@/mysqld_pre_systemd %I

It's some work.
[15 May 2017 15:24] Paul DuBois
Posted by developer:
 
Noted in 5.7.19, 8.0.2 changelogs.

Debian/Ubuntu packages now support multiple MySQL instances with
systemd. See https://dev.mysql.com/doc/refman/5.7/en/using-systemd.html.