#!/bin/sh # # Startet mysql beim starten case "$1" in start) . /etc/init.d/rc.functions # if [ ! -d $DATA_DIR/mysqldata/mysql ] ; then # echo "Installing mysql initial Database:" # /usr/bin/mysql_install_db --force >/dev/null 2>&1 # check_status # fi echo "Starting mysql deamon:" mysqld_safe --user=mysql >/dev/null 2>&1 & check_status ;; stop) . /etc/init.d/rc.functions echo "Stop mysql deamon:" #kill `cat /var/run/mysqld/mysqld.pid 2> /dev/null ` >/dev/null 2>&1 #rm -f /var/run/mysqld/mysqld.pid mysqladmin shutdown -u root --password=root >/dev/null 2>&1 & check_status ;; init) start=1 stop=1 ;; *) echo "Usage $0 {start | stop}" >&2 exit 1 esac