Jump to content
php.lv forumi

MYSQL nestartejas uz slackware


Janhouse

Recommended Posts

Nevaru uz linuxa (slackware) palaist mysql.

Meginu startet, bet to uzreiz aizver.

 

bash-3.1# mysqld_safe &
[1] 2589
bash-3.1# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/lib/mysql/janhousebox.pid
071007 21:50:40  mysqld ended

 

Un kad kautkada brinumaina veida starteja mysql netika izveidots /tmp/mysql.sock

Drosvien tas pats ari te notiek. es nez...

Link to comment
Share on other sites

Paskaties logfailu.

Lasi manuāli.

Izmanto gatavus piemērus.

 

PS: man viss iet rūktdams...

 

cat /etc/rc.d/rc.mysql

#!/bin/sh

# Start MySQL Daemon

BASE_DIR=/usr/local/mysql
DATA_DIR=/data/db/mysql
MYSQL_PID=$DATA_DIR/mysql.pid

# Start mysqld:
mysqld_start() {
 if [ -x $BASE_DIR/bin/mysqld_safe ]; then
if [ -r $MYSQL_PID ]; then
  if ! ps ax | grep mysqld 1> /dev/null 2> /dev/null; then
	echo "Cleaning up old $MYSQL_PID."
	rm -f $PIDFILE
  fi
fi
$BASE_DIR/bin/mysqld_safe \
			--basedir=$BASE_DIR \
			--datadir=$DATA_DIR \
			--pid-file=$MYSQL_PID $SKIP &
 fi
}

# Stop mysqld:
mysqld_stop() {
 if [ -r $MYSQL_PID ]; then
killall mysqld
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_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

Edited by Delfins
Link to comment
Share on other sites

Kā tu uzliki mysql !?

- sources ?

- paka ?

 

Personīgi man logfails glabājās zem $DB rūta...

 

070821 20:33:32  mysqld started
/usr/local/mysql-4.0.23/libexec/mysqld: ready for connections.
Version: '4.0.23a'  socket: '/tmp/mysql.sock'  port: 3306  yes
070824 17:16:44 /usr/local/mysql-4.0.23/libexec/mysqld: Normal shutdown

070824 17:16:44 /usr/local/mysql-4.0.23/libexec/mysqld: Shutdown Complete

070824 17:16:44  mysqld ended

Edited by Delfins
Link to comment
Share on other sites

pie var/logs nav mysql un syslogaa nav nekadi ieraksti par to, ka nepalaidaas mysql. nav tur par mysql vispar nekaa. :\

MySQLs savu logu/sāpi raksta savā datadir... konkrēti tavā gadijumā varētu būt /var/lib/mysql/janhousebox.err

Link to comment
Share on other sites

×
×
  • Create New...