Thanks Lennart, the patch is much nicer to read now. It seems to rely on the fact that it should find the line 'pid-file = /var/run/mysqld/mysqld.pid' in the file /etc/mysql/my.cnf
However, since the new mysql/mariadb config decoupling effort (driven by Ubuntu developers) the file /etc/mysql/my.cnf is no longer the main config file itself, and does not contain the pid line. The actual line is now found in: grep pid /etc/mysql/mariadb.conf.d/* /etc/mysql/mariadb.conf.d/50-server.cnf:pid-file = /var/run/mysqld/mysqld.pid Ironically simply assuming the exact location /var/run/mysqld/mysqld.pid would be more reliable than grepping the configs :) I am glad the fix works in your situation in Debian Jessie. Unfortunately we need to think a bit more to come up with a universal solution.. I am happy to review any alternative solutions/patches anybody posts to this issue.

