Info about mysqld_safe, when to use?

Looking for more information and possibly scenarios where the alternative mysqld/mariadb startup script mysqld_safe might be used.

I became aware of this alternative way to startup only within the last day by reports about a significant vulnerability and patch related to this script (cve-2016-6662) which is so new that the incident number is currently reserved but is not yet described in the official database (as of this writing) so can only be researched based in bug reports and patches (and of course various public comment).

Based on descriptions I’ve read on possible attack vectors, I <don’t> think that any existing openSUSE MySQL/MariaDB install is vulnerable by default although as of today my current TW and LEAP mariadb apps don’t have the patch.

It seems that this is a possibly recommended way to start the mysql/mariadb daemon with certain settings like auto recovery or “can’t kill,” enhanced logging, more

It also looks(to me) like our current default MariaDB installs do <not> implement this script, the mysql daemon is started up the “vanilla” way by systemd

But, if there are any experienced MySQL Admins out there who have used this script, am interested in what situations you’ve done so.


Some extracts from the MariaDB manual:

mysqld_safe is the recommended way to start a mysqld server on Unix … mysqld_safe adds some safety features such as restarting the server when an error occurs and logging runtime information to an error log file.
mysqld_safe tries to start an executable named mysqld.
Many of the options to mysqld_safe are the same as the options to mysqld.
mysqld_safe reads all options from the [mysqld], [server], and [mysqld_safe] sections in option files.
The mysql.server script starts mysqld by first changing to the MariaDB install directory and then calling mysqld_safe.
If you have installed MariaDB to a non-standard location, you may need to edit the mysql.server script to get it to work right.

It was introduced in 5.0.4; so The manual lists a series of options that can be passed.