home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- . /etc/init.d/functions
-
- DATADIR="/var/mysql"
-
- case "$1" in
- start|--start)
- if [ ! -d $DATADIR/mysql ]; then
- mkdir -p $DATADIR/mysql
- echo "Performing setup of mysql"
- mysql_install_db --force --datadir=$DATADIR
- chown -R mysql:mysql $DATADIR
- fi
- /usr/bin/mysqld_safe --user=mysql --skip-innodb --datadir=$DATADIR&
- ;;
-
-
- stop|--stop)
- /usr/bin/mysqladmin shutdown
- ;;
-
- *)
- echo "Usage: mysql {start|stop}" >&2
- exit 2
- esac
-
- exit 0
-