Bug 112829 - /etc/init.d/mysqld start fails but mysql is alive
/etc/init.d/mysqld start fails but mysql is alive
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: mysql (Show other bugs)
1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Patrick Macdonald
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-02 20:27 EST by Need Real Name
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-05 13:44:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2004-01-02 20:27:49 EST
Description of problem:
The script /etc/init.d/mysqld fail testing for mysql alive if the DB
is password protected.

Version-Release number of selected component (if applicable):


How reproducible:

every time

Steps to Reproduce:
1. /etc/init.d/mysqld stop
2. /etc/init.d/mysqld start
3.
  
Actual results:
[root@localhost root]# /etc/init.d/mysqld stop
Interruzione di MySQL:                                     [  OK  ]
[root@localhost root]# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.
Avvio di MySQL:                                            [FALLITO]


Expected results:
Avvio di MySQL:                                            [  OK  ] 

Additional info:
Comment 1 shrek-m 2004-01-04 07:20:21 EST
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=108779


if your mysql-root has a password you have to change the user for
"mysqladmin ping"  "-u none-mysql-existing-user"

eg.
$ grep mysqladmin  /etc/init.d/mysqld
#            if [ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]; then
            if [ -n "`/usr/bin/mysqladmin -unobody ping 2> /dev/null`"
]; then
#            if !([ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]); then
            if !([ -n "`/usr/bin/mysqladmin -unobody ping 2>
/dev/null`" ]); then
Comment 2 Need Real Name 2004-01-04 10:52:00 EST
I have done the changes, all is ok. Could I ask you why the command
must be " /usr/bin/mysqladmin ping 2> /dev/null " instead of = "
/usr/bin/mysqladmin ping > /dev/null " ?
In other words why 2 ? ( I am non a bash guru ( and also not a guru at
all )) :-) ( from command line /usr/bin/mysqladmin ping result ok ; 
/usr/bin/mysqladmin ping 2 result in error ).

Bye.

Luca
Comment 3 shrek-m 2004-01-05 07:16:46 EST
perhaps should only the error(2) be redirected to /dev/null
$ mysqladmin ping 2 > /dev/null
and not the error_or_output
$ mysqladmin ping > /dev/null 2>&1

see
$ man bash
/redirection  /dirlist  /2>&1

1 = standard output
2 = standard error


i do not understand why this part  "spin for a maximum of ten seconds
..."  is in the mysqld-init-script or why it expect that the
mysql-root has no password.
afair it appeared the first time in fedora-test and is imho not necessary.

i had no problems with redhat mysqld-init-scripts since rhl 7.x
Comment 4 Patrick Macdonald 2004-01-05 13:44:20 EST
The looping change was put in as a fix for bug #58372 in October 2003.

Glad you fixed your problem.  There is an updated init script which
points out that you may need to change the mysqladmin ping line.
Comment 5 Eero 2004-01-11 04:30:11 EST
Is fixed package available? Damn annoying bug :)

Note You need to log in before you can comment on or make changes to this bug.