diff options
Diffstat (limited to 'recipes/mysql/files')
-rw-r--r-- | recipes/mysql/files/my.cnf | 2 | ||||
-rw-r--r-- | recipes/mysql/files/mysqld.sh | 10 |
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 |