euglug.org

[Eug-lug] I’m having a “little” trouble getting MySQL going

작성자

카테고리:



Zeb PackardFri Dec 24 16:03:43 PST 2004

Hey I'm having problems getting mysql started on slackware.
First I had a problem with the preinstalled version so I
uninstalled it and reinstalled mysql 4.1.8 figuring starting
from the begining might help. It sure seemed like it was going
to be better this time but when I run:

bash-2.05b# ./bin/mysqld_safe

I get this:
Starting mysqld daemon with databases from /mysql/data
STOPPING server from pid file /mysql/data/ninjaz.pid
041224 14:42:49  mysqld ended

I looked at my pid file and there is nothing in there. If that means 
anything.

when I looked at my .err file this is what I see

041224 14:42:49  mysqld started
041224 14:42:49 [Warning] Asked for 196608 thread stack, but got 126976
041224 14:42:49 [ERROR] Can't start server : Bind on unix socket: No such 
file or directory
041224 14:42:49 [ERROR] Do you already have another mysqld server running on 
socket: /var/run/mysql/mysql.sock ?
041224 14:42:49 [ERROR] Aborting

041224 14:42:49 [Note] /mysql/bin/mysqld: Shutdown complete

041224 14:42:49  mysqld ended

/var/run/ ----is where I mysql was originally installed

I have recently edited my rc.mysqld file to reflect the locations of all my 
new files
this is what it looks like

#!/bin/sh
# Start/stop/restart mysqld.
#
# Copyright 2003 Patrick J. Volkerding, Concord, CA
# Copyright 2003 Slackware Linux, Inc., Concord, CA
#
# This program comes with NO WARRANTY, to the extent permitted by law.
# You may redistribute copies of this program under the terms of the
# GNU General Public License.

# To start MySQL automatically at boot, be sure this script is executable:
# chmod 755 /etc/rc.d/rc.mysqld

# Before you can run MySQL, you must have a database.  To install an initial
# database, do this as root:
#
#   su - mysql
#   mysql_install_db
#
# Note that step one is becoming the mysql user.  It's important to do this
# before making any changes to the database, or mysqld won't be able to 
write
# to it later (this can be fixed with 'chown -R mysql.mysql 
/var/lib/mysql').

# To disallow outside connections to the database (if you don't need them, 
this
# is recommended to increase security), uncomment the next line:
#SKIP="--skip-networking"

# Start mysqld:
mysqld_start() {
  if [ -x /mysql/bin/mysqld_safe ]; then
    # If there is an old PID file (no mysqld running), clean it up:
    if [ -r /mysql/data/ninjaz.pid ]; then
      if ! ps ax | grep mysqld 1> /dev/null 2> /dev/null ; then
        echo "Cleaning up old /mysql/data/ninjaz.pid."
        rm -f /mysql/data/ninjaz.pid
      fi
    fi
    /mysql/bin/mysqld_safe --datadir=/mysql/data 
--pid-file=/mysql/data/ninjaz.pid $SKIP &
  fi
}

# Stop mysqld:
mysqld_stop() {
  # If there is no PID file, ignore this request...
  if [ -r /mysql/data/ninjaz.pid ]; then
    killall mysqld
    # Wait at least one minute for it to exit, as we don't know how big the 
DB is...
    for second in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 
9 \
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 60 ; do
      if [ ! -r /mysql/data/ninjaz.pid ]; then
        break;
      fi
      sleep 1
    done
    if [ "$second" = "60" ]; then
      echo "WARNING:  Gave up waiting for mysqld to exit!"
      sleep 15
    fi
  fi
}

# Restart mysqld:
mysqld_restart() {
  mysqld_stop
  mysqld_start
}

case "$1" in
'start')
  mysqld_start
  ;;
'stop')
  mysqld_stop
  ;;
'restart')
  mysqld_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/