python-pathvalidate: bump version to 0.14.1
[buildroot-gz.git] / package / oracle-mysql / S97mysqld
blob110ca2cd12d77b2d890bb3eb7d9de2a6e66396aa
1 #!/bin/sh
3 MYSQL_DIR="/var/mysql"
4 MYSQL_USER="mysql"
6 [ -r /etc/default/mysql ] && . /etc/default/mysql
8 case "$1" in
9 start)
10 if [ ! -d $MYSQL_DIR/mysql ] ; then
11 echo "Creating MySQL system tables..."
12 mysql_install_db --user=$MYSQL_USER --ldata=$MYSQL_DIR
15 # mysqld runs as user mysql, but /run is only writable by root
16 # so create a subdirectory for mysql.
17 install -d -o mysql -g root -m 0755 /run/mysql
19 # We don't use start-stop-daemon because mysqld has
20 # its own wrapper script.
21 printf "Starting mysql..."
22 /usr/bin/mysqld_safe --pid-file=/run/mysql/mysqld.pid &
23 echo "done."
25 stop)
26 printf "Stopping mysql..."
27 if test -f /run/mysql/mysqld.pid ; then
28 kill `cat /run/mysql/mysqld.pid`
30 echo "done."
32 restart)
33 $0 stop
34 $0 start
37 echo "Usage: /etc/init.d/mysqld {start|stop|restart}"
39 esac