[debian-mysql] mysqld.service
Norvald H. Ryeng
norvald.ryeng at oracle.com
Wed Mar 5 07:33:26 UTC 2014
On Tue, 04 Mar 2014 22:26:44 +0100, <merc1984 at f-m.fm> wrote:
> I'm not a member of the list so please reply offline.
>
> Does anyone have a mysqld.service that actually works in Debian? No
> such thing in Debian as mysql-prepare-db-dir or mysql_safe.
>
> If so, please forward.
This file is used in the packages we (Oracle) deliver in our own Fedora
repo:
http://bazaar.launchpad.net/~mysql/mysql-server/5.7/view/head:/packaging/rpm-fedora/mysqld.service.
I don't think it will work in Debian right out of the box, but it's a good
starting point. You may have to tweak the mysql-systemd-start script a bit
since Debian packages run mysql_install_db in postinstall, while the
Fedora packages do it the first time the service is started.
IIUC, in MySQL 5.5 and 5.6 you'll have to use mysqld_safe with systemd,
but in 5.7 you can start mysqld directly. I haven't looked into it myself,
but I think it's because of the server's choice of exit codes.
Since both Debian and Ubuntu have now chosen systemd, I guess it's only a
matter of time before our service file will have to work on those too.
Regards,
Norvald H. Ryeng
More information about the pkg-mysql-maint
mailing list