The only reference to mysqladmin is for the reload at the end. I think this
whole thing started after doing the mysql_install_db and then creating the root
password - but it may be a coincidence.

Any and all help is welcome as to why /etc/init.d/mysqld stop fails.

The /etc/init.d/mysql is as follows:

#!/bin/bash
#
# mysqld        This shell script takes care of starting and stopping
#               the MySQL subsystem (mysqld).
#
# chkconfig: - 78 12
# description:  MySQL database server.
# processname: mysqld
# config: /etc/my.cnf
# pidfile: /var/run/mysqld/mysqld.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Source subsystem configuration.
[ -f /etc/sysconfig/subsys/mysqld ] && . /etc/sysconfig/subsys/mysqld


prog="MySQL"

start(){
        touch /var/log/mysqld.log
        chown mysql.mysql /var/log/mysqld.log
        chmod 0640 /var/log/mysqld.log
        if [ ! -d /var/lib/mysql/mysql ] ; then
            action $"Initializing MySQL database: " /usr/bin/mysql_install_db
            ret=$?
            chown -R mysql.mysql /var/lib/mysql
            if [ $ret -ne 0 ] ; then
                return $ret
            fi
        fi
        chown -R mysql.mysql /var/lib/mysql
        chmod 0755 /var/lib/mysql
        /usr/bin/safe_mysqld  --defaults-file=/etc/my.cnf >/dev/null 2>&1 &
        ret=$?
        if [ $ret -eq 0 ]; then
            action $"Starting $prog: " /bin/true
        else
            action $"Starting $prog: " /bin/false
        fi
        [ $ret -eq 0 ] && touch /var/lock/subsys/mysqld
        return $ret
}

stop(){
        /bin/kill `cat /var/run/mysqld/mysqld.pid  2> /dev/null ` > /dev/null
2>&1
        ret=$?
        if [ $ret -eq 0 ]; then
            action $"Stopping $prog: " /bin/true
        else
            action $"Stopping $prog: " /bin/false
        fi
        [ $ret -eq 0 ] && rm -f /var/lock/subsys/mysqld
        [ $ret -eq 0 ] && rm -f /var/lib/mysql/mysql.sock
        return $ret
}

restart(){
    stop
    start
}

condrestart(){
    [ -e /var/lock/subsys/mysqld ] && restart || :
}

reload(){
    [ -e /var/lock/subsys/mysqld ] && mysqladmin reload
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  status)
    status mysqld
    ;;
  reload)
    reload
    ;;
  restart)
    restart
    ;;
  condrestart)
    condrestart
    ;;
  *)
    echo $"Usage: $0 {start|stop|status|reload|condrestart|restart}"
    exit 1
esac

exit $?




Bill Adams <[EMAIL PROTECTED]> on 11/12/2001 01:11:37 PM

To:   Lad Gaal/MarconiMedical@Marconi, Mysql List <[EMAIL PROTECTED]>
cc:

Subject:  Re: Can't stop mysql



[EMAIL PROTECTED] wrote:

> I'll agree with you but - when I shutdown my linux box or restart it, it tries
> to stop the mysql server and it can't. The command /etc/init.d/mysqld stop
> should work and it isn't. The question is why can't I stop the mysql server
with
> this command. As a matter of fact, using /etc/init.d/mysqld stop restart
fails
> when it tries the stop. There has to be something convoluted in one of the
> script files. Besides that, I'm not the only one with this issue.
> thanks

This is really a distribution issue then.  But I would look inside the
init.d/mysqld script and see if it is calling mysqladmin or not.  If it is: Does
it
have the full path to mysqladmin?  Did you set the root password in MySQL and
now
need to specify it in the file, e.g.: "mysqladmin -pthe.root?password shutdown"?

b.



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to