[csw-devel] SF.net SVN: gar:[13423] csw/mgar/pkg/mysql5/trunk

rthurner at users.sourceforge.net rthurner at users.sourceforge.net
Sun Feb 20 22:32:23 CET 2011


Revision: 13423
          http://gar.svn.sourceforge.net/gar/?rev=13423&view=rev
Author:   rthurner
Date:     2011-02-20 21:32:23 +0000 (Sun, 20 Feb 2011)

Log Message:
-----------
mysql5: upgrade to mysql-5.5, first try

Modified Paths:
--------------
    csw/mgar/pkg/mysql5/trunk/Makefile
    csw/mgar/pkg/mysql5/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/mysql5/trunk/files/CSWmysql55.postinstall
    csw/mgar/pkg/mysql5/trunk/files/CSWmysql55.preinstall
    csw/mgar/pkg/mysql5/trunk/files/cswmysql55

Removed Paths:
-------------
    csw/mgar/pkg/mysql5/trunk/files/CSWmysql51.postinstall
    csw/mgar/pkg/mysql5/trunk/files/CSWmysql51.preinstall
    csw/mgar/pkg/mysql5/trunk/files/cswmysql51

Modified: csw/mgar/pkg/mysql5/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mysql5/trunk/Makefile	2011-02-20 21:25:52 UTC (rev 13422)
+++ csw/mgar/pkg/mysql5/trunk/Makefile	2011-02-20 21:32:23 UTC (rev 13423)
@@ -2,9 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-NAME = mysql51
-BASE_VERSION = 5.1
-PATCHLEVEL = 40
+NAME = mysql55
+BASE_VERSION = 5.5
+PATCHLEVEL = 9
 VERSION = $(BASE_VERSION).$(PATCHLEVEL)
 CATEGORIES = server
 

Modified: csw/mgar/pkg/mysql5/trunk/checksums
===================================================================
--- csw/mgar/pkg/mysql5/trunk/checksums	2011-02-20 21:25:52 UTC (rev 13422)
+++ csw/mgar/pkg/mysql5/trunk/checksums	2011-02-20 21:32:23 UTC (rev 13423)
@@ -1,12 +1 @@
-a0b98a7320bce2da3e1f90da704d3c85  0001-Use-libc-not-libcrypt.patch
-1414d06fab1530484a508927a0de4154  0002-cast-user_info-pw_gid-to-gid_t.patch
-5415f365f1b0f7a179d1efc25f45bbee  0003-OpenCSW-perl-for-tests.patch
-8ab232cd4d232b3cda3bbced93f80237  0004-basedir-and-datadir-in-the-cnf-files.patch
-c8c2ef6365a9bd9b71fac6198d3eeef8  CSWmysql51.postinstall
-a652ccff001c328178f4b0ed9bfebbd6  CSWmysql51.preinstall
-e691b0cf00a3925ac55c1844045d6e30  ChangeLog
-e42afb5ec1b1ab02d2ec3b46d0922636  README.CSW
-0974c28c048437612c6a0ace93460d3b  cswmysql51
-67228e1f096fe08a94f4267439a4ec36  cswusergroup
-32e7373c16271606007374396e6742ad  mysql-5.1.40.tar.gz
-60bc6bed72839668ef6496fd31a01ad3  quick_start-csw
+701c0c44b7f1c2300adc0dc45729f903  mysql-5.5.9.tar.gz

Deleted: csw/mgar/pkg/mysql5/trunk/files/CSWmysql51.postinstall
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/CSWmysql51.postinstall	2011-02-20 21:25:52 UTC (rev 13422)
+++ csw/mgar/pkg/mysql5/trunk/files/CSWmysql51.postinstall	2011-02-20 21:32:23 UTC (rev 13423)
@@ -1,15 +0,0 @@
-#!/bin/sh
-#
-# $Id$
-#
-
-MYSQLDATADIR=/var/opt/csw/mysql5
-if [ ! -d "${MYSQLDATADIR}/mysql" ] ; then
-  echo "No database directory found in the default location:"
-  echo "${MYSQLDATADIR}/mysql"
-  echo "If you need to build the initial database directory,"
-  echo "  see /opt/csw/mysql5/share/mysql/quick_start-csw"
-  echo "If you are using a non-default database directory location,"
-  echo "  please start mysql manually."
-  exit 0
-fi

Deleted: csw/mgar/pkg/mysql5/trunk/files/CSWmysql51.preinstall
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/CSWmysql51.preinstall	2011-02-20 21:25:52 UTC (rev 13422)
+++ csw/mgar/pkg/mysql5/trunk/files/CSWmysql51.preinstall	2011-02-20 21:32:23 UTC (rev 13423)
@@ -1,40 +0,0 @@
-#!/bin/sh
-# vim:set sw=2 ts=2 sts=2 expandtab:
-#
-# $Id$
-#
-
-obsolete_directories="/opt/csw/mysql5/var:/var/opt/csw/mysql5"
-
-obsolete_dir_information="
-This directory is obsolete.  Files in this directory are going to be ignored.
-Please move your data to the new location.
-
-Feel free to remove this file afterwards.
-"
-obsolete_dir_file_name="README.THIS_DIRECTORY_IS_OBSOLETE"
-
-for dirpair in ${obsolete_directories}; do
-  obsolete_dir=`echo ${dirpair} | cut -d: -f1`
-  new_dir=`echo ${dirpair} | cut -d: -f2`
-  if [ -d "${PKG_INSTALL_ROOT}${obsolete_dir}" ]; then
-    echo
-    echo "*******************************************************************"
-    echo "* The old configuration directory ${obsolete_dir} still exists.    "
-    echo "* Please move your configuration to ${new_dir}.                    "
-    echo "*                                                                  "
-    echo "*       Installation will continue in 10 seconds.                  "
-    echo "*         Press CTRL+C if you want to stop now.                    "
-    echo "*******************************************************************"
-    echo
-    sleep 10
-
-    # Leaving a note for the sysadmin if the they proceed with the installation.
-    fn="${PKG_INSTALL_ROOT}${obsolete_dir}/${obsolete_dir_file_name}"
-    if touch "${fn}" 2>/dev/null; then
-      echo "${obsolete_dir_information}" > "${fn}"
-    fi
-  fi
-done
-
-exit 0

Copied: csw/mgar/pkg/mysql5/trunk/files/CSWmysql55.postinstall (from rev 13392, csw/mgar/pkg/mysql5/trunk/files/CSWmysql51.postinstall)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/CSWmysql55.postinstall	                        (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/CSWmysql55.postinstall	2011-02-20 21:32:23 UTC (rev 13423)
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# $Id$
+#
+
+MYSQLDATADIR=/var/opt/csw/mysql5
+if [ ! -d "${MYSQLDATADIR}/mysql" ] ; then
+  echo "No database directory found in the default location:"
+  echo "${MYSQLDATADIR}/mysql"
+  echo "If you need to build the initial database directory,"
+  echo "  see /opt/csw/mysql5/share/mysql/quick_start-csw"
+  echo "If you are using a non-default database directory location,"
+  echo "  please start mysql manually."
+  exit 0
+fi

Copied: csw/mgar/pkg/mysql5/trunk/files/CSWmysql55.preinstall (from rev 13392, csw/mgar/pkg/mysql5/trunk/files/CSWmysql51.preinstall)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/CSWmysql55.preinstall	                        (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/CSWmysql55.preinstall	2011-02-20 21:32:23 UTC (rev 13423)
@@ -0,0 +1,40 @@
+#!/bin/sh
+# vim:set sw=2 ts=2 sts=2 expandtab:
+#
+# $Id$
+#
+
+obsolete_directories="/opt/csw/mysql5/var:/var/opt/csw/mysql5"
+
+obsolete_dir_information="
+This directory is obsolete.  Files in this directory are going to be ignored.
+Please move your data to the new location.
+
+Feel free to remove this file afterwards.
+"
+obsolete_dir_file_name="README.THIS_DIRECTORY_IS_OBSOLETE"
+
+for dirpair in ${obsolete_directories}; do
+  obsolete_dir=`echo ${dirpair} | cut -d: -f1`
+  new_dir=`echo ${dirpair} | cut -d: -f2`
+  if [ -d "${PKG_INSTALL_ROOT}${obsolete_dir}" ]; then
+    echo
+    echo "*******************************************************************"
+    echo "* The old configuration directory ${obsolete_dir} still exists.    "
+    echo "* Please move your configuration to ${new_dir}.                    "
+    echo "*                                                                  "
+    echo "*       Installation will continue in 10 seconds.                  "
+    echo "*         Press CTRL+C if you want to stop now.                    "
+    echo "*******************************************************************"
+    echo
+    sleep 10
+
+    # Leaving a note for the sysadmin if the they proceed with the installation.
+    fn="${PKG_INSTALL_ROOT}${obsolete_dir}/${obsolete_dir_file_name}"
+    if touch "${fn}" 2>/dev/null; then
+      echo "${obsolete_dir_information}" > "${fn}"
+    fi
+  fi
+done
+
+exit 0

Deleted: csw/mgar/pkg/mysql5/trunk/files/cswmysql51
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/cswmysql51	2011-02-20 21:25:52 UTC (rev 13422)
+++ csw/mgar/pkg/mysql5/trunk/files/cswmysql51	2011-02-20 21:32:23 UTC (rev 13423)
@@ -1,183 +0,0 @@
-#!/bin/sh
-#
-# $Id$
-# Start script for MySQL database.
-#
-# NOTE: Make sure DB_DIR is owned BY the mysql user and group and chmod
-# 700.
-#
-# First time installation can use quick_start-csw in
-#   /opt/csw/mysql5/share/mysql to build the mysql database for the
-#   grant tables.  Or create the initial database yourself.
-#
-# Use my.cnf for startup options.  See MySQL documention
-#   for 'Using Option Files'.
-# Support for mysql5rc still remains in this startup script.
-#
-
-RETVAL=0
-MYSQLHOME=/opt/csw/mysql5
-MYSQL_VAR=/var/opt/csw/mysql5
-MYSQLD_DATADIR=$MYSQL_VAR
-MYSQLD_PID_FILE=$MYSQL_VAR/mysql.pid
-CONFFILE=$MYSQL_VAR/my.cnf
-
-#
-# Source configuration
-[ -r /opt/csw/mysql5/etc/mysql5rc ] && . /opt/csw/mysql5/etc/mysql5rc
-[ -r /etc/opt/csw/mysql5rc ] && . /etc/opt/csw/mysql5rc
-
-# To get started quickly, copy a sample configuration file from
-#   $MYSQLHOME/share/mysql
-# For example,
-#  cp /opt/csw/mysql5/share/mysql/my-medium.cnf /opt/csw/mysql5/var/my.cnf
-#
-# Or, manually follow the database creation steps below, and have
-# mysql just use defaults for everything.
-
-# 2006-03-11 Changed to only look for the grant tables database
-# 2006-04-16 Changed again.  Look for either the grant tables database
-#            or the options file.
-# 2006-12-28 Fix problem.  Look for either the grant tables database in
-#            the default location or the default options file.
-if [ ! -d "$MYSQLD_DATADIR/mysql" -a ! -f "$CONFFILE" ] ; then
-    exit 0
-fi
-
-# If CONFFILE is the server default file, unset CONFFILE
-if [ x"$CONFFILE" = x"$MYSQL_VAR/my.cnf" ]; then
-    CONFFILE=
-fi
-
-# If MYSQLD_DATADIR does not contain a mysql directory, unset MYSQLD_DATADIR
-# Also, check that MYSQLD_DATADIR contains a mysql directory
-if [ ! -d "$MYSQL_VAR/mysql" -a ! -d "$MYSQLD_DATADIR/mysql" ] ; then
-    MYSQLD_DATADIR=
-fi
-
-# Make sure required vars are set
-MYSQLD_PID_FILE=${MYSQLD_PID_FILE:=$MYSQL_VAR/mysql.pid}
-
-# If a database already exists, start whether or not there is a conf file.
-# If no conf file, the database will just use internal defaults for everything.
-
-start_it() {
-    if test -r $MYSQLD_PID_FILE ; then
-        if kill -0 `cat $MYSQLD_PID_FILE` > /dev/null 2>&1 ; then
-            echo "mysqld (`cat $MYSQLD_PID_FILE`) seems to be running."
-            return 1
-        fi
-    fi
-
-    printf "%-60s" "Starting mysqld: "
-# 2006-03-11
-# This script no longer creates the default database. You may create the
-# default database manually or use /opt/csw/mysql5/share/mysql/quick_start-csw
-#    if [ ! -d "$MYSQLHOME/var/mysql" ] ; then
-#        echo MySQL core database has not been created.
-#         echo Creating it now...
-#       $MYSQLHOME/bin/mysql_install_db
-#       chown -R mysql:mysql $MYSQLHOME/var
-#    fi
-
-# 2006-04-16  --defaults-file is changed to --defaults-extra-file
-    $MYSQLHOME/bin/mysqld_safe \
-        `[ -n "$CONFFILE" ] && echo "--defaults-extra-file=$CONFFILE"` \
-        --pid-file=$MYSQLD_PID_FILE \
-        `[ -n "$MYSQLD_PROG" ] && echo "--mysqld=$MYSQLD_PROG"` \
-        `[ -n "$MYSQLD_ANSI" ] && echo "--ansi"` \
-        `[ -n "$MYSQLD_BASEDIR" ] && echo "--basedir=$MYSQLD_BASEDIR"` \
-        `[ -n "$MYSQLD_BIG_TABLES" ] && echo "--big-tables"` \
-        `[ -n "$MYSQLD_BIND_ADDRESS" ] && echo "--bind-address=$MYSQLD_BIND_ADDRESS"` \
-        `[ -n "$MYSQLD_CHARACTER_SETS" ] && echo "--character-sets-dir=$MYSQLD_CHARACTER_SETS"` \
-        `[ -n "$MYSQLD_CHROOT" ] && echo "--chroot=$MYSQLD_CHROOT"` \
-        `[ -n "$MYSQLD_DATADIR" ] && echo "--datadir=$MYSQLD_DATADIR"` \
-        `[ -n "$MYSQLD_DEFAULT_CHARSET" ] && echo "--default-character-set=$MYSQLD_DEFAULT_CHARSET"` \
-        `[ -n "$MYSQLD_DEFAULT_TABLE_TYPE" ] && echo "--default-table-type=$MYSQLD_DEFAULT_TABLE_TYPE"` \
-        `[ -n "$MYSQLD_DELAY_KEY_WRITE_TABLES" ] && echo "--delay-key-write-for-all-tables"` \
-        `[ -n "$MYSQLD_ENABLE_LOCKING" ] && echo "--enable-locking"` \
-        `[ -n "$MYSQLD_EXIT_INFO" ] && echo "--exit-info"` \
-        `[ -n "$MYSQLD_FLUSH" ] && echo "--flush"` \
-        `[ -n "$MYSQLD_INIT_FILE" ] && echo "--init-file=$MYSQLD_INIT_FILE"` \
-        `[ -n "$MYSQLD_LANGUAGE" ] && echo "--language=$MYSQLD_LANGUAGE"` \
-        `[ -n "$MYSQLD_LOG" ] && echo "--log=$MYSQLD_LOG"` \
-        `[ -n "$MYSQLD_LOG_ISAM" ] && echo "--log-isam=$MYSQLD_LOG_ISAM"` \
-        `[ -n "$MYSQLD_LOG_SLOW_QUERIES" ] && echo "--log-slow-queries=$MYSQLD_LOG_SLOW_QUERIES"` \
-        `[ -n "$MYSQLD_LOG_UPDATE" ] && echo "--log-update=$MYSQLD_LOG_UPDATE"` \
-        `[ -n "$MYSQLD_LOG_LONG_FORMAT" ] && echo "--log-long-format"` \
-        `[ -n "$MYSQLD_LOW_PRIORITY_UPDATES" ] && echo "--low-priority-updates"` \
-        `[ -n "$MYSQLD_MEMLOCK" ] && echo "--memlock"` \
-        `[ -n "$MYSQLD_MYISAM_RECOVER" ] && echo "--myisam-recover=$MYSQLD_MYISAM_RECOVER"` \
-        `[ -n "$MYSQLD_PORT" ] && echo "--port=$MYSQLD_PORT"` \
-        `[ -n "$MYSQLD_OLD_PROTOCOL" ] && echo "--old-protocol"` \
-        `[ -n "$MYSQLD_ONE_THREAD" ] && echo "--one-thread"` \
-        `[ -n "$MYSQLD_SET_VARIABLE" ] && echo "--set-variablevar=$MYSQLD_SET_VARIABLE"` \
-        `[ -n "$MYSQLD_SKIP_GRANT_TABLES" ] && echo "--skip-grant-tables"` \
-        `[ -n "$MYSQLD_SAFE_MODE" ] && echo "--safe-mode"` \
-        `[ -n "$MYSQLD_SECURE" ] && echo "--secure"` \
-        `[ -n "$MYSQLD_SKIP_CONCURRENT_INSERT" ] && echo "--skip-concurrent-insert"` \
-        `[ -n "$MYSQLD_SKIP_DELAY_KEY_WRITE" ] && echo "--skip-delay-key-write"` \
-        `[ -n "$MYSQLD_SKIP_LOCKING" ] && echo "--skip-locking"` \
-        `[ -n "$MYSQLD_SKIP_NAME_RESOLVE" ] && echo "--skip-name-resolve"` \
-        `[ -n "$MYSQLD_SKIP_NETWORKING" ] && echo "--skip-networking"` \
-        `[ -n "$MYSQLD_SKIP_NEW" ] && echo "--skip-new"` \
-        `[ -n "$MYSQLD_SKIP_HOST_CACHE" ] && echo "--skip-host-cache"` \
-        `[ -n "$MYSQLD_SKIP_SHOW_DATABASE" ] && echo "--skip-show-database"` \
-        `[ -n "$MYSQLD_SKIP_THREAD_PRIORITY" ] && echo "--skip-thread-priority"` \
-        `[ -n "$MYSQLD_SOCKET" ] && echo "--socket=$MYSQLD_SOCKET"` \
-        `[ -n "$MYSQLD_TMPDIR" ] && echo "--tmpdir=$MYSQLD_TMPDIR"` \
-        `[ -n "$MYSQLD_USER" ] && echo "--user=$MYSQLD_USER"` \
-        & >/dev/null 2>&1
-    RETVAL=$?
-    if [ $RETVAL = 0 ] ; then
-        echo "[  OK  ]"
-    else
-        echo "[FAILED]"
-        return 1
-    fi
-    return 0
-}
-
-stop_it() {
-
-    printf "%-60s" "Shutting down mysqld: "
-    if test -f "$MYSQLD_PID_FILE" ; then
-        pkill mysqld_safe >/dev/null 2>&1
-        kill `cat $MYSQLD_PID_FILE` >/dev/null 2>&1
-        RETVAL=$?
-    else
-        RETVAL=1
-    fi
-    if [ $RETVAL = 0 ] ; then
-        echo "[  OK  ]"
-    else
-        echo "[FAILED]"
-    fi
-    echo ""
-    return 0
-}
-
-case $1 in
-    start)
-    start_it
-    ;;
-
-    stop)
-    stop_it
-    ;;
-
-    restart)
-    stop_it
-    while pgrep mysqld > /dev/null
-      do
-      sleep 1
-    done
-    start_it
-    ;;
-
-    *)
-    echo "Usage: $0  { start | stop | restart } "
-    ;;
-esac
-
-exit $RETVAL

Copied: csw/mgar/pkg/mysql5/trunk/files/cswmysql55 (from rev 13392, csw/mgar/pkg/mysql5/trunk/files/cswmysql51)
===================================================================
--- csw/mgar/pkg/mysql5/trunk/files/cswmysql55	                        (rev 0)
+++ csw/mgar/pkg/mysql5/trunk/files/cswmysql55	2011-02-20 21:32:23 UTC (rev 13423)
@@ -0,0 +1,183 @@
+#!/bin/sh
+#
+# $Id$
+# Start script for MySQL database.
+#
+# NOTE: Make sure DB_DIR is owned BY the mysql user and group and chmod
+# 700.
+#
+# First time installation can use quick_start-csw in
+#   /opt/csw/mysql5/share/mysql to build the mysql database for the
+#   grant tables.  Or create the initial database yourself.
+#
+# Use my.cnf for startup options.  See MySQL documention
+#   for 'Using Option Files'.
+# Support for mysql5rc still remains in this startup script.
+#
+
+RETVAL=0
+MYSQLHOME=/opt/csw/mysql5
+MYSQL_VAR=/var/opt/csw/mysql5
+MYSQLD_DATADIR=$MYSQL_VAR
+MYSQLD_PID_FILE=$MYSQL_VAR/mysql.pid
+CONFFILE=$MYSQL_VAR/my.cnf
+
+#
+# Source configuration
+[ -r /opt/csw/mysql5/etc/mysql5rc ] && . /opt/csw/mysql5/etc/mysql5rc
+[ -r /etc/opt/csw/mysql5rc ] && . /etc/opt/csw/mysql5rc
+
+# To get started quickly, copy a sample configuration file from
+#   $MYSQLHOME/share/mysql
+# For example,
+#  cp /opt/csw/mysql5/share/mysql/my-medium.cnf /opt/csw/mysql5/var/my.cnf
+#
+# Or, manually follow the database creation steps below, and have
+# mysql just use defaults for everything.
+
+# 2006-03-11 Changed to only look for the grant tables database
+# 2006-04-16 Changed again.  Look for either the grant tables database
+#            or the options file.
+# 2006-12-28 Fix problem.  Look for either the grant tables database in
+#            the default location or the default options file.
+if [ ! -d "$MYSQLD_DATADIR/mysql" -a ! -f "$CONFFILE" ] ; then
+    exit 0
+fi
+
+# If CONFFILE is the server default file, unset CONFFILE
+if [ x"$CONFFILE" = x"$MYSQL_VAR/my.cnf" ]; then
+    CONFFILE=
+fi
+
+# If MYSQLD_DATADIR does not contain a mysql directory, unset MYSQLD_DATADIR
+# Also, check that MYSQLD_DATADIR contains a mysql directory
+if [ ! -d "$MYSQL_VAR/mysql" -a ! -d "$MYSQLD_DATADIR/mysql" ] ; then
+    MYSQLD_DATADIR=
+fi
+
+# Make sure required vars are set
+MYSQLD_PID_FILE=${MYSQLD_PID_FILE:=$MYSQL_VAR/mysql.pid}
+
+# If a database already exists, start whether or not there is a conf file.
+# If no conf file, the database will just use internal defaults for everything.
+
+start_it() {
+    if test -r $MYSQLD_PID_FILE ; then
+        if kill -0 `cat $MYSQLD_PID_FILE` > /dev/null 2>&1 ; then
+            echo "mysqld (`cat $MYSQLD_PID_FILE`) seems to be running."
+            return 1
+        fi
+    fi
+
+    printf "%-60s" "Starting mysqld: "
+# 2006-03-11
+# This script no longer creates the default database. You may create the
+# default database manually or use /opt/csw/mysql5/share/mysql/quick_start-csw
+#    if [ ! -d "$MYSQLHOME/var/mysql" ] ; then
+#        echo MySQL core database has not been created.
+#         echo Creating it now...
+#       $MYSQLHOME/bin/mysql_install_db
+#       chown -R mysql:mysql $MYSQLHOME/var
+#    fi
+
+# 2006-04-16  --defaults-file is changed to --defaults-extra-file
+    $MYSQLHOME/bin/mysqld_safe \
+        `[ -n "$CONFFILE" ] && echo "--defaults-extra-file=$CONFFILE"` \
+        --pid-file=$MYSQLD_PID_FILE \
+        `[ -n "$MYSQLD_PROG" ] && echo "--mysqld=$MYSQLD_PROG"` \
+        `[ -n "$MYSQLD_ANSI" ] && echo "--ansi"` \
+        `[ -n "$MYSQLD_BASEDIR" ] && echo "--basedir=$MYSQLD_BASEDIR"` \
+        `[ -n "$MYSQLD_BIG_TABLES" ] && echo "--big-tables"` \
+        `[ -n "$MYSQLD_BIND_ADDRESS" ] && echo "--bind-address=$MYSQLD_BIND_ADDRESS"` \
+        `[ -n "$MYSQLD_CHARACTER_SETS" ] && echo "--character-sets-dir=$MYSQLD_CHARACTER_SETS"` \
+        `[ -n "$MYSQLD_CHROOT" ] && echo "--chroot=$MYSQLD_CHROOT"` \
+        `[ -n "$MYSQLD_DATADIR" ] && echo "--datadir=$MYSQLD_DATADIR"` \
+        `[ -n "$MYSQLD_DEFAULT_CHARSET" ] && echo "--default-character-set=$MYSQLD_DEFAULT_CHARSET"` \
+        `[ -n "$MYSQLD_DEFAULT_TABLE_TYPE" ] && echo "--default-table-type=$MYSQLD_DEFAULT_TABLE_TYPE"` \
+        `[ -n "$MYSQLD_DELAY_KEY_WRITE_TABLES" ] && echo "--delay-key-write-for-all-tables"` \
+        `[ -n "$MYSQLD_ENABLE_LOCKING" ] && echo "--enable-locking"` \
+        `[ -n "$MYSQLD_EXIT_INFO" ] && echo "--exit-info"` \
+        `[ -n "$MYSQLD_FLUSH" ] && echo "--flush"` \
+        `[ -n "$MYSQLD_INIT_FILE" ] && echo "--init-file=$MYSQLD_INIT_FILE"` \
+        `[ -n "$MYSQLD_LANGUAGE" ] && echo "--language=$MYSQLD_LANGUAGE"` \
+        `[ -n "$MYSQLD_LOG" ] && echo "--log=$MYSQLD_LOG"` \
+        `[ -n "$MYSQLD_LOG_ISAM" ] && echo "--log-isam=$MYSQLD_LOG_ISAM"` \
+        `[ -n "$MYSQLD_LOG_SLOW_QUERIES" ] && echo "--log-slow-queries=$MYSQLD_LOG_SLOW_QUERIES"` \
+        `[ -n "$MYSQLD_LOG_UPDATE" ] && echo "--log-update=$MYSQLD_LOG_UPDATE"` \
+        `[ -n "$MYSQLD_LOG_LONG_FORMAT" ] && echo "--log-long-format"` \
+        `[ -n "$MYSQLD_LOW_PRIORITY_UPDATES" ] && echo "--low-priority-updates"` \
+        `[ -n "$MYSQLD_MEMLOCK" ] && echo "--memlock"` \
+        `[ -n "$MYSQLD_MYISAM_RECOVER" ] && echo "--myisam-recover=$MYSQLD_MYISAM_RECOVER"` \
+        `[ -n "$MYSQLD_PORT" ] && echo "--port=$MYSQLD_PORT"` \
+        `[ -n "$MYSQLD_OLD_PROTOCOL" ] && echo "--old-protocol"` \
+        `[ -n "$MYSQLD_ONE_THREAD" ] && echo "--one-thread"` \
+        `[ -n "$MYSQLD_SET_VARIABLE" ] && echo "--set-variablevar=$MYSQLD_SET_VARIABLE"` \
+        `[ -n "$MYSQLD_SKIP_GRANT_TABLES" ] && echo "--skip-grant-tables"` \
+        `[ -n "$MYSQLD_SAFE_MODE" ] && echo "--safe-mode"` \
+        `[ -n "$MYSQLD_SECURE" ] && echo "--secure"` \
+        `[ -n "$MYSQLD_SKIP_CONCURRENT_INSERT" ] && echo "--skip-concurrent-insert"` \
+        `[ -n "$MYSQLD_SKIP_DELAY_KEY_WRITE" ] && echo "--skip-delay-key-write"` \
+        `[ -n "$MYSQLD_SKIP_LOCKING" ] && echo "--skip-locking"` \
+        `[ -n "$MYSQLD_SKIP_NAME_RESOLVE" ] && echo "--skip-name-resolve"` \
+        `[ -n "$MYSQLD_SKIP_NETWORKING" ] && echo "--skip-networking"` \
+        `[ -n "$MYSQLD_SKIP_NEW" ] && echo "--skip-new"` \
+        `[ -n "$MYSQLD_SKIP_HOST_CACHE" ] && echo "--skip-host-cache"` \
+        `[ -n "$MYSQLD_SKIP_SHOW_DATABASE" ] && echo "--skip-show-database"` \
+        `[ -n "$MYSQLD_SKIP_THREAD_PRIORITY" ] && echo "--skip-thread-priority"` \
+        `[ -n "$MYSQLD_SOCKET" ] && echo "--socket=$MYSQLD_SOCKET"` \
+        `[ -n "$MYSQLD_TMPDIR" ] && echo "--tmpdir=$MYSQLD_TMPDIR"` \
+        `[ -n "$MYSQLD_USER" ] && echo "--user=$MYSQLD_USER"` \
+        & >/dev/null 2>&1
+    RETVAL=$?
+    if [ $RETVAL = 0 ] ; then
+        echo "[  OK  ]"
+    else
+        echo "[FAILED]"
+        return 1
+    fi
+    return 0
+}
+
+stop_it() {
+
+    printf "%-60s" "Shutting down mysqld: "
+    if test -f "$MYSQLD_PID_FILE" ; then
+        pkill mysqld_safe >/dev/null 2>&1
+        kill `cat $MYSQLD_PID_FILE` >/dev/null 2>&1
+        RETVAL=$?
+    else
+        RETVAL=1
+    fi
+    if [ $RETVAL = 0 ] ; then
+        echo "[  OK  ]"
+    else
+        echo "[FAILED]"
+    fi
+    echo ""
+    return 0
+}
+
+case $1 in
+    start)
+    start_it
+    ;;
+
+    stop)
+    stop_it
+    ;;
+
+    restart)
+    stop_it
+    while pgrep mysqld > /dev/null
+      do
+      sleep 1
+    done
+    start_it
+    ;;
+
+    *)
+    echo "Usage: $0  { start | stop | restart } "
+    ;;
+esac
+
+exit $RETVAL


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list