Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
cc315541
Commit
cc315541
authored
Jan 19, 2018
by
Daniel Black
Committed by
Sergey Vojtovich
Jan 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-5510: Replace MySQL -> MariaDB in init scripts
parent
701c7e77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
support-files/mysql.server.sh
support-files/mysql.server.sh
+24
-24
No files found.
support-files/mysql.server.sh
View file @
cc315541
...
...
@@ -2,7 +2,7 @@
# Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
# This file is public domain and comes with NO WARRANTY of any kind
# M
ySQL
daemon start/stop script.
# M
ariaDB
daemon start/stop script.
# Usually this is put in /etc/init.d (at least on machines SYSV R4 based
# systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/K01mysql.
...
...
@@ -21,14 +21,14 @@
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop M
ySQL
# Description: M
ySQL
is a very fast and reliable SQL database engine.
# Short-Description: start and stop M
ariaDB
# Description: M
ariaDB
is a very fast and reliable SQL database engine.
### END INIT INFO
# If you install M
ySQL
on some other places than @prefix@, then you
# If you install M
ariaDB
on some other places than @prefix@, then you
# have to do one of the following things for this script to work:
#
# - Run this script from within the M
ySQL
installation directory
# - Run this script from within the M
ariaDB
installation directory
# - Create a /etc/my.cnf file with the following information:
# [mysqld]
# basedir=<path-to-mysql-installation-directory>
...
...
@@ -37,11 +37,11 @@
# - Add the path to the mysql-installation-directory to the basedir variable
# below.
#
# If you want to affect other M
ySQL
variables, you should make your changes
# in the /etc/my.cnf, ~/.my.cnf or other M
ySQL
configuration files.
# If you want to affect other M
ariaDB
variables, you should make your changes
# in the /etc/my.cnf, ~/.my.cnf or other M
ariaDB
configuration files.
# If you change base dir, you must also change datadir. These may get
# overwritten by settings in the M
ySQL
configuration files.
# overwritten by settings in the M
ariaDB
configuration files.
basedir
=
datadir
=
...
...
@@ -291,7 +291,7 @@ case "$mode" in
# Safeguard (relative paths, core dumps..)
cd
$basedir
echo
$echo_n
"Starting M
ySQL
"
echo
$echo_n
"Starting M
ariaDB
"
if
test
-x
$bindir
/mysqld_safe
then
# Give extra arguments to mysqld with the my.cnf file. This script
...
...
@@ -307,7 +307,7 @@ case "$mode" in
exit
$return_value
else
log_failure_msg
"Couldn't find M
ySQL
server (
$bindir
/mysqld_safe)"
log_failure_msg
"Couldn't find M
ariaDB
server (
$bindir
/mysqld_safe)"
fi
;;
...
...
@@ -321,12 +321,12 @@ case "$mode" in
if
(
kill
-0
$mysqld_pid
2>/dev/null
)
then
echo
$echo_n
"Shutting down M
ySQL
"
echo
$echo_n
"Shutting down M
ariaDB
"
kill
$mysqld_pid
# mysqld should remove the pid file when it exits, so wait for it.
wait_for_gone
$mysqld_pid
"
$mysqld_pid_file_path
"
;
return_value
=
$?
else
log_failure_msg
"M
ySQL
server process #
$mysqld_pid
is not running!"
log_failure_msg
"M
ariaDB
server process #
$mysqld_pid
is not running!"
rm
"
$mysqld_pid_file_path
"
fi
...
...
@@ -337,7 +337,7 @@ case "$mode" in
fi
exit
$return_value
else
log_failure_msg
"M
ySQL
server PID file could not be found!"
log_failure_msg
"M
ariaDB
server PID file could not be found!"
fi
;;
...
...
@@ -355,10 +355,10 @@ case "$mode" in
'reload'
|
'force-reload'
)
if
test
-s
"
$mysqld_pid_file_path
"
;
then
read
mysqld_pid <
"
$mysqld_pid_file_path
"
kill
-HUP
$mysqld_pid
&&
log_success_msg
"Reloading service M
ySQL
"
kill
-HUP
$mysqld_pid
&&
log_success_msg
"Reloading service M
ariaDB
"
touch
"
$mysqld_pid_file_path
"
else
log_failure_msg
"M
ySQL
PID file could not be found!"
log_failure_msg
"M
ariaDB
PID file could not be found!"
exit
1
fi
;;
...
...
@@ -367,10 +367,10 @@ case "$mode" in
if
test
-s
"
$mysqld_pid_file_path
"
;
then
read
mysqld_pid <
"
$mysqld_pid_file_path
"
if
kill
-0
$mysqld_pid
2>/dev/null
;
then
log_success_msg
"M
ySQL
running (
$mysqld_pid
)"
log_success_msg
"M
ariaDB
running (
$mysqld_pid
)"
exit
0
else
log_failure_msg
"M
ySQL
is not running, but PID file exists"
log_failure_msg
"M
ariaDB
is not running, but PID file exists"
exit
1
fi
else
...
...
@@ -380,17 +380,17 @@ case "$mode" in
# test if multiple pids exist
pid_count
=
`
echo
$mysqld_pid
|
wc
-w
`
if
test
$pid_count
-gt
1
;
then
log_failure_msg
"Multiple M
ySQL
running but PID file could not be found (
$mysqld_pid
)"
log_failure_msg
"Multiple M
ariaDB
running but PID file could not be found (
$mysqld_pid
)"
exit
5
elif
test
-z
$mysqld_pid
;
then
if
test
-f
"
$lock_file_path
"
;
then
log_failure_msg
"M
ySQL
is not running, but lock file (
$lock_file_path
) exists"
log_failure_msg
"M
ariaDB
is not running, but lock file (
$lock_file_path
) exists"
exit
2
fi
log_failure_msg
"M
ySQL
is not running"
log_failure_msg
"M
ariaDB
is not running"
exit
3
else
log_failure_msg
"M
ySQL
is running but PID file could not be found"
log_failure_msg
"M
ariaDB
is running but PID file could not be found"
exit
4
fi
fi
...
...
@@ -398,7 +398,7 @@ case "$mode" in
'configtest'
)
# Safeguard (relative paths, core dumps..)
cd
$basedir
echo
$echo_n
"Testing M
ySQL
configuration syntax"
echo
$echo_n
"Testing M
ariaDB
configuration syntax"
daemon
=
$bindir
/mysqld
if
test
-x
$libexecdir
/mysqld
then
...
...
@@ -425,7 +425,7 @@ case "$mode" in
*
)
# usage
basename
=
`
basename
"
$0
"
`
echo
"Usage:
$basename
{start|stop|restart|reload|force-reload|status|configtest} [ M
ySQL
server options ]"
echo
"Usage:
$basename
{start|stop|restart|reload|force-reload|status|configtest} [ M
ariaDB
server options ]"
exit
1
;;
esac
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment