[debian-mysql] Bug#742900: Bug#742900: No mysqld.service File

Clint Byrum clint at fewbar.com
Fri Mar 28 20:25:39 UTC 2014


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?



More information about the pkg-mysql-maint mailing list