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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
321c53d9
Commit
321c53d9
authored
Feb 05, 2005
by
petr@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed setup scripts to use mysqlmanager instead of mysqld_safe
parent
63acf2a8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
44 deletions
+42
-44
server-tools/instance-manager/Makefile.am
server-tools/instance-manager/Makefile.am
+1
-3
server-tools/instance-manager/instance_options.cc
server-tools/instance-manager/instance_options.cc
+3
-0
server-tools/instance-manager/user_map.cc
server-tools/instance-manager/user_map.cc
+1
-1
support-files/mysql.server.sh
support-files/mysql.server.sh
+36
-40
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+1
-0
No files found.
server-tools/instance-manager/Makefile.am
View file @
321c53d9
...
@@ -30,9 +30,7 @@ liboptions_a_CPPFLAGS= $(CPPFLAGS) \
...
@@ -30,9 +30,7 @@ liboptions_a_CPPFLAGS= $(CPPFLAGS) \
-DDEFAULT_LOG_FILE_NAME
=
"
$(localstatedir)
/mysqlmanager.log"
\
-DDEFAULT_LOG_FILE_NAME
=
"
$(localstatedir)
/mysqlmanager.log"
\
-DDEFAULT_SOCKET_FILE_NAME
=
"
$(localstatedir)
/mysqlmanager.sock"
\
-DDEFAULT_SOCKET_FILE_NAME
=
"
$(localstatedir)
/mysqlmanager.sock"
\
-DDEFAULT_PASSWORD_FILE_NAME
=
"
$(sysconfdir)
/mysqlmanager.passwd"
\
-DDEFAULT_PASSWORD_FILE_NAME
=
"
$(sysconfdir)
/mysqlmanager.passwd"
\
-DDEFAULT_MYSQLD_PATH
=
"
$(bindir)
/mysqld
$(EXEEXT)
"
\
-DDEFAULT_MYSQLD_PATH
=
"
$(libexecdir)
/mysqld
$(EXEEXT)
"
\
-DDEFAULT_USER
=
"root"
\
-DDEFAULT_PASSWORD
=
""
\
-DDEFAULT_MONITORING_INTERVAL
=
"20"
\
-DDEFAULT_MONITORING_INTERVAL
=
"20"
\
-DDEFAULT_PORT
=
"2273"
\
-DDEFAULT_PORT
=
"2273"
\
-DPROTOCOL_VERSION
=
@PROTOCOL_VERSION@
-DPROTOCOL_VERSION
=
@PROTOCOL_VERSION@
...
...
server-tools/instance-manager/instance_options.cc
View file @
321c53d9
...
@@ -225,6 +225,9 @@ int Instance_options::add_option(const char* option)
...
@@ -225,6 +225,9 @@ int Instance_options::add_option(const char* option)
}
}
}
}
/* if we haven't returned earlier we should just save the option */
insert_dynamic
(
&
options_array
,(
gptr
)
&
tmp
);
return
0
;
return
0
;
err:
err:
...
...
server-tools/instance-manager/user_map.cc
View file @
321c53d9
...
@@ -129,7 +129,7 @@ int User_map::load(const char *password_file_name)
...
@@ -129,7 +129,7 @@ int User_map::load(const char *password_file_name)
if
((
file
=
my_fopen
(
password_file_name
,
O_RDONLY
|
O_BINARY
,
MYF
(
0
)))
==
0
)
if
((
file
=
my_fopen
(
password_file_name
,
O_RDONLY
|
O_BINARY
,
MYF
(
0
)))
==
0
)
{
{
/* Probably the password file wasn't specified. Try to leave without it */
/* Probably the password file wasn't specified. Try to leave without it */
log_info
(
"can't open password file %s: errno=%d, %s"
,
password_file_name
,
log_info
(
"
[WARNING]
can't open password file %s: errno=%d, %s"
,
password_file_name
,
errno
,
strerror
(
errno
));
errno
,
strerror
(
errno
));
return
0
;
return
0
;
}
}
...
...
support-files/mysql.server.sh
View file @
321c53d9
#!/bin/sh
#!/bin/sh
# Copyright
Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron H
B
# Copyright
(C) 2005 MySQL A
B
# This file is public domain and comes with NO WARRANTY of any kind
# This file is public domain and comes with NO WARRANTY of any kind
# MySQL daemon start/stop script.
# MySQL
server management
daemon start/stop script.
# Usually this is put in /etc/init.d (at least on machines SYSV R4 based
# 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.
# systems) and linked to /etc/rc3.d/S99mysqlmanager and
# /etc/rc0.d/K01mysqlmanager
# When this is done the mysql server will be started when the machine is
# When this is done the mysql server will be started when the machine is
# started and shut down when the systems goes down.
# started and shut down when the systems goes down.
# Comments to support chkconfig on RedHat Linux
# description: MySQL database server Instance Manager
# chkconfig: 2345 90 20
# description: A very fast and reliable SQL database engine.
# Comments to support LSB init script conventions
# Comments to support LSB init script conventions
### BEGIN INIT INFO
### BEGIN INIT INFO
# Provides: mysql
# Provides: mysql
manager
# Required-Start: $local_fs $network $remote_fs
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Default-Stop: 0 1 6
# Short-Description: start and stop MySQL
# Short-Description: start and stop MySQL Instance Manager
# Description: MySQL is a very fast and reliable SQL database engine.
# Description: MySQL Instance Manager is used to start/stop/status/monitor
# MySQL server instances
### END INIT INFO
### END INIT INFO
# If you install MySQL 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 MySQL installation directory
# - Create a /etc/my.cnf file with the following information:
# [mysqld]
# basedir=<path-to-mysql-installation-directory>
# - Add the above to any other configuration file (for example ~/.my.ini)
# and copy my_print_defaults to /usr/bin
# - Add the path to the mysql-installation-directory to the basedir variable
# below.
#
# If you want to affect other MySQL variables, you should make your changes
# in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.
basedir
=
basedir
=
# The following variables are only set for letting mysql.server find things.
# The following variables are only set for letting mysql.server find things.
...
@@ -50,8 +35,10 @@ if test -z "$basedir"
...
@@ -50,8 +35,10 @@ if test -z "$basedir"
then
then
basedir
=
@prefix@
basedir
=
@prefix@
bindir
=
@bindir@
bindir
=
@bindir@
sbindir
=
@sbindir@
else
else
bindir
=
"
$basedir
/bin"
bindir
=
"
$basedir
/bin"
sbindir
=
"
$basedir
/sbin"
fi
fi
PATH
=
/sbin:/usr/sbin:/bin:/usr/bin:
$basedir
/bin
PATH
=
/sbin:/usr/sbin:/bin:/usr/bin:
$basedir
/bin
...
@@ -65,11 +52,18 @@ case `echo "testing\c"`,`echo -n testing` in
...
@@ -65,11 +52,18 @@ case `echo "testing\c"`,`echo -n testing` in
*
)
echo_n
=
echo_c
=
'\c'
;;
*
)
echo_n
=
echo_c
=
'\c'
;;
esac
esac
parse_arguments
()
{
parse_
server_
arguments
()
{
for
arg
do
for
arg
do
case
"
$arg
"
in
case
"
$arg
"
in
--basedir
=
*
)
basedir
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
--basedir
=
*
)
basedir
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
--datadir
=
*
)
datadir
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
--datadir
=
*
)
datadir
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
esac
done
}
parse_manager_arguments
()
{
for
arg
do
case
"
$arg
"
in
--pid-file
=
*
)
pid_file
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
--pid-file
=
*
)
pid_file
=
`
echo
"
$arg
"
|
sed
-e
's/^[^=]*=//'
`
;;
esac
esac
done
done
...
@@ -125,14 +119,16 @@ then
...
@@ -125,14 +119,16 @@ then
extra_args
=
"-e
$datadir
/my.cnf"
extra_args
=
"-e
$datadir
/my.cnf"
fi
fi
parse_arguments
`
$print_defaults
$extra_args
mysqld server mysql_server mysql.server
`
parse_server_arguments
`
$print_defaults
$extra_args
mysqld server mysql_server mysql.server
`
parse_manager_arguments
`
$print_defaults
manager
`
#
#
# Set pid file if not given
# Set pid file if not given
#
#
if
test
-z
"
$pid_file
"
if
test
-z
"
$pid_file
"
then
then
pid_file
=
$datadir
/
`
@HOSTNAME@
`
.pid
pid_file
=
$datadir
/
mysqlmanager-
`
@HOSTNAME@
`
.pid
else
else
case
"
$pid_file
"
in
case
"
$pid_file
"
in
/
*
)
;;
/
*
)
;;
...
@@ -147,18 +143,18 @@ case "$mode" in
...
@@ -147,18 +143,18 @@ case "$mode" in
'start'
)
'start'
)
# Start daemon
# Start daemon
if
test
-x
$
bindir
/mysqld_safe
if
test
-x
$
sbindir
/mysqlmanager
then
then
# Give extra arguments to mysql
d
with the my.cnf file. This script may
# Give extra arguments to mysql
manager
with the my.cnf file. This script may
# be overwritten at next upgrade.
# be overwritten at next upgrade.
$
bindir
/mysqld_safe
--datadir
=
$datadir
--pid-file
=
$pid_fil
e
>
/dev/null 2>&1 &
$
sbindir
/mysqlmanager
"--pid-file=
$pid_file
"
--run-as-servic
e
>
/dev/null 2>&1 &
# Make lock for RedHat / SuSE
# Make lock for RedHat / SuSE
if
test
-w
/var/lock/subsys
if
test
-w
/var/lock/subsys
then
then
touch
/var/lock/subsys/mysql
touch
/var/lock/subsys/mysql
manager
fi
fi
else
else
echo
"Can't execute
$
bindir
/mysqld_safe
from dir
$basedir
"
echo
"Can't execute
$
sbindir
/mysqlmanager
from dir
$basedir
"
fi
fi
;;
;;
...
@@ -167,15 +163,15 @@ case "$mode" in
...
@@ -167,15 +163,15 @@ case "$mode" in
# root password.
# root password.
if
test
-s
"
$pid_file
"
if
test
-s
"
$pid_file
"
then
then
mysql
d
_pid
=
`
cat
$pid_file
`
mysql
manager
_pid
=
`
cat
$pid_file
`
echo
"Killing mysql
d with pid
$mysqld
_pid
"
echo
"Killing mysql
manager with pid
$mysqlmanager
_pid
"
kill
$mysql
d
_pid
kill
$mysql
manager
_pid
# mysql
d
should remove the pid_file when it exits, so wait for it.
# mysql
manager
should remove the pid_file when it exits, so wait for it.
sleep
1
sleep
1
while
[
-s
$pid_file
-a
"
$flags
"
!=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
]
while
[
-s
$pid_file
-a
"
$flags
"
!=
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
]
do
do
[
-z
"
$flags
"
]
&&
echo
$echo_n
"Wait for mysql
d
to exit
$echo_c
"
||
echo
$echo_n
".
$echo_c
"
[
-z
"
$flags
"
]
&&
echo
$echo_n
"Wait for mysql
manager
to exit
$echo_c
"
||
echo
$echo_n
".
$echo_c
"
flags
=
a
$flags
flags
=
a
$flags
sleep
1
sleep
1
done
done
...
@@ -185,12 +181,12 @@ case "$mode" in
...
@@ -185,12 +181,12 @@ case "$mode" in
then
echo
" done"
then
echo
" done"
fi
fi
# delete lock for RedHat / SuSE
# delete lock for RedHat / SuSE
if
test
-f
/var/lock/subsys/mysql
if
test
-f
/var/lock/subsys/mysql
manager
then
then
rm
-f
/var/lock/subsys/mysql
rm
-f
/var/lock/subsys/mysql
manager
fi
fi
else
else
echo
"No mysql
d
pid file found. Looked for
$pid_file
."
echo
"No mysql
manager
pid file found. Looked for
$pid_file
."
fi
fi
;;
;;
...
...
support-files/mysql.spec.sh
View file @
321c53d9
...
@@ -515,6 +515,7 @@ fi
...
@@ -515,6 +515,7 @@ fi
%attr
(
755, root, root
)
%
{
_bindir
}
/safe_mysqld
%attr
(
755, root, root
)
%
{
_bindir
}
/safe_mysqld
%attr
(
755, root, root
)
%
{
_sbindir
}
/mysqld
%attr
(
755, root, root
)
%
{
_sbindir
}
/mysqld
%attr
(
755, root, root
)
%
{
_sbindir
}
/mysqlmanager
%attr
(
755, root, root
)
%
{
_sbindir
}
/rcmysql
%attr
(
755, root, root
)
%
{
_sbindir
}
/rcmysql
%attr
(
644, root, root
)
%
{
_libdir
}
/mysql/mysqld.sym
%attr
(
644, root, root
)
%
{
_libdir
}
/mysql/mysqld.sym
...
...
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