[debian-mysql] Bug#742900: No mysqld.service File
merc1984 at f-m.fm
merc1984 at f-m.fm
Fri Mar 28 22:17:22 UTC 2014
On Fri, Mar 28, 2014, at 13:25, Clint Byrum wrote:
> Excerpts from merc1984's message of 2014-03-28 12:20:04 -0700:
> >
> > Package: mysql-server
> > Version: 5.5-35
> >
> > Implementation of systemd is imminent, yet after days of research I can
> > not find a mysqld.service file that actually works in Debian. I've
> > searched and searched, asked on mailing lists, and asked in IRC on
> > #debian, #systemd, and #mysql.
> >
> > Nobody knows, or at least nobody helps. There isn't even a
> > mysqld.service file in Sid's mysql-server package.
> >
> > I can't use the sysv-dependent systemd service as I have another service
> > which depends on mysql (mythtv-backend), and it simply does not work
> > with the kludge.
> >
> > This is a showstopper for me, and probably others.
> >
>
> Hi merc. mythtv-backend shouldn't "depend" on the ordering of local
> MySQL startup anyway. What if you boot your external MySQL server at
> the same time as mythtv-backend? YOu can't really control the sequence
> of that ever.
>
> I suggest making mythtv-backend poll like this:
>
> while !mysqladmin ping --host=${mysqlserver} --user=${mysqluser}
> --password=${mysqlpadd} ; do
> echo "MySQL not ready yet."
> sleep 5
> done
>
> Also consider filing a bug in mythtv-backend's upstream code, as it
> should be able to poll at startup and reconnect on errors as well.
>
> As for a working systemd unit file.. perhaps we can crib from Fedora?
Can't. My mythbackend.service also must depend on a device to come
ready after its firmware is loaded. And this requires that it be a
systemd service.
Of course Myth should depend on MySQL first starting. In my
mythbackend.service I have Requires=mysqld.service and
After=mysqld.service, so it will wait for mysql to start, no polling
needed. And polling is inferior to having systemd handle the
dependencies.
But in order for systemd to handle it, there must also be a
mysqld.service service, and nothing I've tried has worked. I've tried
to use Fed's mysql.service and Arch's mysql.service, but each has quite
a different structure than Debian, and I could not get either to work no
matter how much fiddling. Finally after days of struggle I gave up and
filed this bug.
--
http://www.fastmail.fm - mmm... Fastmail...
More information about the pkg-mysql-maint
mailing list