Description of problem: This is of course just my "opionion", however it would seem advantageous to employ MySQL's packaged tools to get at MySQL options (which we have to know about before actually starting MySQL server) instead of additional sed-based extraction. MySQL option handling is already confusing enough - let's not add to it. In this spirit, I have attached a modified init.d script that gets options from my.cnf using "my_print_defaults", as is done in the MySQL "mysqld_safe" script. As a side note, "my_print_defaults" seems to miss the following features: 1) Set the path of my.cnf files to check. Currently this is compiled-in, which is not too flexible. Like this: my_print_defaults --search=/etc/my.cnf:/var/lib/mysql/my.cnf:$HOME/.my.cnf 2) Concatenate the options of several my.cnf sections in a single stream, in a specific order. Rendered necessary as the sections seem to change names depending on the version. Like this: my_print_defaults --sections=mysqld:mysql.server:mysqld_safe But that is another story. Version-Release number of selected component (if applicable): mysql-server-4.1.20-1.RHEL4.1 Also see bug #194596, which applies to Fedora though.
Created attachment 150835 [details] The new init script and a diff relative to the old one
Cough! I guess the script should not try to get data from section "[mysql.server]", even if such a section exists in the delivered "my.cnf"; mysqld_safe does not seem to read from it. Exclusively use section "[mysqld]" instead. And do not try to set "basedir" in "my.cnf" either or terrible things happen :-/ Instead let mysqld_safe find it by itself and set it to "--basedir=/usr"
*** Bug 235626 has been marked as a duplicate of this bug. ***
The "--defaults-file="/etc/my.cnf"" option should not be used in the start script. It prevents mysqld from reading the other option files. See comments in Bug 235626.
This request was evaluated by Red Hat Product Management for inclusion, but this component is not scheduled to be updated in the current Red Hat Enterprise Linux release. If you would like this request to be reviewed for the next minor release, ask your support representative to set the next rhel-x.y flag to "?".
The rpm package is not well-behaved. It clobbers the /etc/init.d/mysqld file if it had been modified.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2008-0768.html