summaryrefslogtreecommitdiff
path: root/recipes/mysql/files
diff options
context:
space:
mode:
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2009-11-06 08:39:56 +0100
committerFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2009-11-06 08:39:56 +0100
commit189a5b7f7665ce2c1d4d406ca7343ffeb3ea2afd (patch)
tree587cde15e3451ba5354d35ddb92e0a441d2514d1 /recipes/mysql/files
parentc1ff4bb5b83ee24724041aa7babec986b6ad60ab (diff)
mysql: moved pid dir from /var/run/mysql to /var/lib/mysql as /var/run is created upon boot
(and so var/run disappears) added restart to init.d script
Diffstat (limited to 'recipes/mysql/files')
-rw-r--r--recipes/mysql/files/my.cnf2
-rw-r--r--recipes/mysql/files/mysqld.sh10
2 files changed, 8 insertions, 4 deletions
diff --git a/recipes/mysql/files/my.cnf b/recipes/mysql/files/my.cnf
index 46f5316bc5..85560ebf5c 100644
--- a/recipes/mysql/files/my.cnf
+++ b/recipes/mysql/files/my.cnf
@@ -10,7 +10,7 @@ err-log = /var/log/mysql.err
user = mysql
port = 3306
socket = /tmp/mysql.sock
-pid-file = /var/run/mysql/mysqld.pid
+pid-file = /var/lib/mysql/mysqld.pid
log-error = /var/log/mysqld.err
basedir = /usr
datadir = /var/mysql
diff --git a/recipes/mysql/files/mysqld.sh b/recipes/mysql/files/mysqld.sh
index c94772e202..479ebdb257 100644
--- a/recipes/mysql/files/mysqld.sh
+++ b/recipes/mysql/files/mysqld.sh
@@ -7,13 +7,17 @@ case "$1" in
/usr/bin/mysqld_safe &
;;
stop)
- if test -f /var/run/mysqld.pid ; then
- PID=`cat /var/run/mysqld.pid`
+ if test -f /var/lib/mysql/mysqld.pid ; then
+ PID=`cat /var/lib/mysql/mysqld.pid`
kill $PID
fi
;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
*)
- echo "Usage: /etc/init.d/mysqld {start|stop}"
+ echo "Usage: /etc/init.d/mysqld {start|stop|restart}"
;;
esac