[debian-mysql] Bug#798080: mysql-server-5.6: service stop hangs forever on systemd

Laurent Bigonville bigon at debian.org
Sat Mar 26 10:12:50 UTC 2016


severity 798080 serious
tag 798080 + patch
thanks

Hi,

I think the following patch should fix this (not tested though).

If I'm not wrong, the mysqld_safe already switch the mysql user during 
the startup process. So instead of allowing the mysql group to access 
the debian.cnf file, let the mysqld_safe script run as root. If I'm not 
wrong other distributions are already doing like that.

Also I quickly look at the initscript, and I see the following line:

su - mysql -s /bin/sh -c "/usr/bin/mysqld_safe > /dev/null 2>&1 &"

I'm not sure that using "su" here is a good idea as in that case a PAM 
session is opened. I would suggest to user either "runuser" or not 
manually switching the user and let the mysqld_safe script do the 
switch, again need to be tested.

Cheers,

Laurent Bigonville
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 798080.patch
Type: text/x-patch
Size: 563 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20160326/e6acdbb4/attachment.bin>


More information about the pkg-mysql-maint mailing list