Red Hat Bugzilla – Bug 17899
mysql daemon is not starting
Last modified: 2007-04-18 12:28:40 EDT
The script /usr/bin/safe_mysqld which starts the mysql daemon has on my
computer a bug...
the script uses:
to get the NOHUP_NICENESS.
the return value for me is "-5".
in the following nice is executed like this:
nice --$NOHUP_NICENESS nohup
which results in 3 dashes (---) and creates an error in the mysql log
000927 00:50:54 mysqld started
nice: unrecognized option `---5'
Try `nice --help' for more information.
000927 00:50:54 mysqld ended.
I changed it from
nice --$NOHUP_NICENESS nohup
nice -$NOHUP_NICENESS nohup
and it works now for me.
There is a known bug in mysql as shipped with 7.0 - this was released as an
errata today. Tried that? (3.23.24-1)
I installed the errata but the error still exists.
i had to do the same changes to /usr/bin/safe_mysqld, as i have done to the
original mysql version shipping with 7.0
It works fine here, and has been tested with PHP etc. by QA.... how do you start
But the problem could be anywhere else, because the update to 7.0 was done by
hand. Maybe I forgot to update a tool which is used in the startup script. The
database is running. I just had to change to startup script.
OK, I'll close it as a configuration issue... this works on the computers I've
This is not a configuration error, i got this too.
This is a bug in the safe_mysqld script, check it out yourself.
nice expects a value between 19 and -20, bug safe_mysqld prepends a - to
the nice value.
So if $NOHUP_NICENESS is -5 it tries to set nice to --5 which confuses
I use mysql-server 3.23.24-1, directly installed from the redhat update
agent, no previous versions installed, i didn't have the energy to look
for the RedHat CD's. :)
OK, I can see there's a problem if you have negative niceness. Removing one of
the dashes just makes "-5" act like "5". Negative niceness is rarely used, and
only by root specifying it.... how did you get that value?
for some reason, it happens like this, have no idea why.. there is no nice stuff
in /etc/rc.d/init.d/* or /usr/bin/safe_mysqld
i grepped both directories/files for both 'nice' and '-5'
[root@localhost /root]# nice
[root@localhost /root]# test=`nohup nice`
[root@localhost /root]# echo $test
On my machine:
[root@hoser /root]# test=`nohup nice`
[root@hoser /root]# echo $test
I'm very curious how you get it - it's usually not used, but root can set
processes to it.
this seems to be the source of the problem:
[root@localhost /root]# nice -5 nice
[root@localhost /root]# nice --5 nice
perhaps safe_mysqld is not the only program making positive niceness negative?
I did some changes to the package in the current tree, and an upcoming errata
for another issue (buggy aliasing code in mysql) will include this - basically
check that no niceness value is below 0.
*** Bug 196649 has been marked as a duplicate of this bug. ***