summaryrefslogtreecommitdiffstats
path: root/source/ap/mysql/rc.mysqld
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2013-11-04 17:08:47 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:57:36 +0200
commit76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (patch)
tree9b98e6e193c7870cb27ac861394c1c4592850922 /source/ap/mysql/rc.mysqld
parent9664bee729d487bcc0a0bc35859f8e13d5421c75 (diff)
downloadcurrent-slackware-14.1.tar.gz
current-slackware-14.1.tar.xz
Slackware 14.1slackware-14.1
Mon Nov 4 17:08:47 UTC 2013 Slackware 14.1 x86_64 stable is released! It's been another interesting release cycle here at Slackware bringing new features like support for UEFI machines, updated compilers and development tools, the switch from MySQL to MariaDB, and many more improvements throughout the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/ap/mysql/rc.mysqld')
-rw-r--r--source/ap/mysql/rc.mysqld86
1 files changed, 0 insertions, 86 deletions
diff --git a/source/ap/mysql/rc.mysqld b/source/ap/mysql/rc.mysqld
deleted file mode 100644
index 300e6eb2d..000000000
--- a/source/ap/mysql/rc.mysqld
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/sh
-# Start/stop/restart mysqld.
-#
-# Copyright 2003 Patrick J. Volkerding, Concord, CA
-# Copyright 2003 Slackware Linux, Inc., Concord, CA
-# Copyright 2008 Patrick J. Volkerding, Sebeka, MN
-#
-# This program comes with NO WARRANTY, to the extent permitted by law.
-# You may redistribute copies of this program under the terms of the
-# GNU General Public License.
-
-# To start MySQL automatically at boot, be sure this script is executable:
-# chmod 755 /etc/rc.d/rc.mysqld
-
-# Before you can run MySQL, you must have a database. To install an initial
-# database, do this as root:
-#
-# mysql_install_db --user=mysql
-#
-# Note that the mysql user must exist in /etc/passwd, and the created files
-# will be owned by this dedicated user. This is important, or else mysql
-# (which runs as user "mysql") will not be able to write to the database
-# later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
-#
-# To increase system security, consider using "mysql_secure_installation"
-# as well. For more information on this tool, please read:
-# man mysql_secure_installation
-
-# To allow outside connections to the database comment out the next line.
-# If you don't need incoming network connections, then leave the line
-# uncommented to improve system security.
-SKIP="--skip-networking"
-
-# Start mysqld:
-mysqld_start() {
- if [ -x /usr/bin/mysqld_safe ]; then
- # If there is an old PID file (no mysqld running), clean it up:
- if [ -r /var/run/mysql/mysql.pid ]; then
- if ! ps axc | grep mysqld 1> /dev/null 2> /dev/null ; then
- echo "Cleaning up old /var/run/mysql/mysql.pid."
- rm -f /var/run/mysql/mysql.pid
- fi
- fi
- /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP &
- fi
-}
-
-# Stop mysqld:
-mysqld_stop() {
- # If there is no PID file, ignore this request...
- if [ -r /var/run/mysql/mysql.pid ]; then
- killall mysqld
- # Wait at least one minute for it to exit, as we don't know how big the DB is...
- for second in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 \
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 60 ; do
- if [ ! -r /var/run/mysql/mysql.pid ]; then
- break;
- fi
- sleep 1
- done
- if [ "$second" = "60" ]; then
- echo "WARNING: Gave up waiting for mysqld to exit!"
- sleep 15
- fi
- fi
-}
-
-# Restart mysqld:
-mysqld_restart() {
- mysqld_stop
- mysqld_start
-}
-
-case "$1" in
-'start')
- mysqld_start
- ;;
-'stop')
- mysqld_stop
- ;;
-'restart')
- mysqld_restart
- ;;
-*)
- echo "usage $0 start|stop|restart"
-esac