2009-09-16 14:03:18 +02:00
'\" t
2009-05-25 11:59:47 +02:00
. \"
2017-04-03 14:11:27 +02:00
.TH "\FBMYSQLD_MULTI\FR" "1" "3 April 2017" "MariaDB 10\&.2" "MariaDB Database System"
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
2009-05-25 11:59:47 +02:00
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
. \" mysqld_multi
. \" tools: mysqld_multi
. \" scripts
. \" multi mysqld
2009-05-25 11:59:47 +02:00
.SH "NAME"
2015-09-10 20:12:50 +02:00
mysqld_multi \- manage multiple MariaDB servers
2009-05-25 11:59:47 +02:00
.SH "SYNOPSIS"
2009-09-16 14:03:18 +02:00
.HP \w '\fBmysqld_multi\ [\fR\fB\fIoptions\fR\fR\fB]\ {start|stop|report}\ [\fR\fB\fIGNR\fR\fR\fB[,\fR\fB\fIGNR\fR\fR\fB]\ \& .\&.\&.]\fR\ 'u
\fB mysqld_multi [\fR \fB \fI options\fR \fR \fB ] {start|stop|report} [\fR \fB \fI GNR\fR \fR \fB [,\fR \fB \fI GNR\fR \fR \fB ] \& .\& .\& .]\fR
2009-05-25 11:59:47 +02:00
.SH "DESCRIPTION"
.PP
\fB mysqld_multi\fR
is designed to manage several
\fB mysqld\fR
2015-09-10 20:12:50 +02:00
processes that listen for connections on different Unix socket files and TCP/IP ports\& . It can start or stop servers, or report their current status\& .
2009-05-25 11:59:47 +02:00
.PP
\fB mysqld_multi\fR
searches for groups named
[mysqld\fI N\fR ]
in
2009-09-16 14:03:18 +02:00
my\& .cnf
2009-05-25 11:59:47 +02:00
(or in the file named by the
\fB \- \- config\- file\fR
2009-09-16 14:03:18 +02:00
option)\& .
2009-05-25 11:59:47 +02:00
\fI N\fR
2009-09-16 14:03:18 +02:00
can be any positive integer\& . This number is referred to in the following discussion as the option group number, or
\fI GNR\fR \& . Group numbers distinguish option groups from one another and are used as arguments to
2009-05-25 11:59:47 +02:00
\fB mysqld_multi\fR
2009-09-16 14:03:18 +02:00
to specify which servers you want to start, stop, or obtain a status report for\& . Options listed in these groups are the same that you would use in the
2009-05-25 11:59:47 +02:00
[mysqld]
group used for starting
2015-09-10 20:12:50 +02:00
\fB mysqld\fR \& . However, when using multiple servers, it is necessary that each one use its own value for options such as the Unix socket file and TCP/IP port number\& .
2009-05-25 11:59:47 +02:00
.PP
To invoke
\fB mysqld_multi\fR , use the following syntax:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2009-09-16 14:03:18 +02:00
shell> \fB mysqld_multi [\fR \fB \fI options\fR \fR \fB ] {start|stop|report} [\fR \fB \fI GNR\fR \fR \fB [,\fR \fB \fI GNR\fR \fR \fB ] \& .\& .\& .]\fR
2009-05-25 11:59:47 +02:00
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
start,
stop, and
report
2009-09-16 14:03:18 +02:00
indicate which operation to perform\& . You can perform the designated operation for a single server or multiple servers, depending on the
2009-05-25 11:59:47 +02:00
\fI GNR\fR
2009-09-16 14:03:18 +02:00
list that follows the option name\& . If there is no list,
2009-05-25 11:59:47 +02:00
\fB mysqld_multi\fR
2009-09-16 14:03:18 +02:00
performs the operation for all servers in the option file\& .
2009-05-25 11:59:47 +02:00
.PP
Each
\fI GNR\fR
2009-09-16 14:03:18 +02:00
value represents an option group number or range of group numbers\& . The value should be the number at the end of the group name in the option file\& . For example, the
2009-05-25 11:59:47 +02:00
\fI GNR\fR
for a group named
[mysqld17]
is
2009-09-16 14:03:18 +02:00
17\& . To specify a range of numbers, separate the first and last numbers by a dash\& . The
2009-05-25 11:59:47 +02:00
\fI GNR\fR
value
10\- 13
represents groups
[mysqld10]
through
2009-09-16 14:03:18 +02:00
[mysqld13]\& . Multiple groups or group ranges can be specified on the command line, separated by commas\& . There must be no whitespace characters (spaces or tabs) in the
2009-05-25 11:59:47 +02:00
\fI GNR\fR
2009-09-16 14:03:18 +02:00
list; anything after a whitespace character is ignored\& .
2009-05-25 11:59:47 +02:00
.PP
This command starts a single server using option group
[mysqld17]:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
shell> \fB mysqld_multi start 17\fR
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
This command stops several servers, using option groups
[mysqld8]
and
[mysqld10]
through
[mysqld13]:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
shell> \fB mysqld_multi stop 8,10\- 13\fR
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
For an example of how you might set up an option file, use this command:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
shell> \fB mysqld_multi \- \- example\fR
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
\fB mysqld_multi\fR
searches for option files as follows:
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: no-defaults option
. \" no-defaults option: mysqld_multi
2009-05-25 11:59:47 +02:00
With
2009-09-16 14:03:18 +02:00
\fB \- \- no\- defaults\fR , no option files are read\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: defaults-file option
. \" defaults-file option: mysqld_multi
2009-05-25 11:59:47 +02:00
With
2009-09-16 14:03:18 +02:00
\fB \- \- defaults\- file=\fR \fB \fI file_name\fR \fR , only the named file is read\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: defaults-extra-file option
. \" defaults-extra-file option: mysqld_multi
2009-05-25 11:59:47 +02:00
Otherwise, option files in the standard list of locations are read, including any file named by the
\fB \- \- defaults\- extra\- file=\fR \fB \fI file_name\fR \fR
2009-09-16 14:03:18 +02:00
option, if one is given\& . (If the option is given multiple times, the last value is used\& .)
2009-05-25 11:59:47 +02:00
.RE
.PP
2009-12-01 08:24:05 +01:00
Option files read are searched for
[mysqld_multi]
and
[mysqld\fI N\fR ]
option groups\& . The
[mysqld_multi]
group can be used for options to
\fB mysqld_multi\fR
itself\& .
[mysqld\fI N\fR ]
groups can be used for options passed to specific
\fB mysqld\fR
instances\& .
.PP
2015-09-10 20:12:50 +02:00
The
2009-12-01 08:24:05 +01:00
[mysqld]
or
[mysqld_safe]
groups can be used for common options read by all instances of
\fB mysqld\fR
or
\fB mysqld_safe\fR \& . You can specify a
\fB \- \- defaults\- file=\fR \fB \fI file_name\fR \fR
option to use a different configuration file for that instance, in which case the
[mysqld]
or
[mysqld_safe]
2015-09-10 20:12:50 +02:00
groups from that file will be used for that instance\& .
2009-12-01 08:24:05 +01:00
.PP
2009-05-25 11:59:47 +02:00
\fB mysqld_multi\fR
2010-04-28 15:06:11 +02:00
supports the following options\& .
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: help option
. \" help option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- help\fR
.sp
2009-09-16 14:03:18 +02:00
Display a help message and exit\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: example option
. \" example option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- example\fR
.sp
2009-09-16 14:03:18 +02:00
Display a sample option file\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: log option
. \" log option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- log=\fR \fB \fI file_name\fR \fR
.sp
2009-09-16 14:03:18 +02:00
Specify the name of the log file\& . If the file exists, log output is appended to it\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: mysqladmin option
. \" mysqladmin option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- mysqladmin=\fR \fB \fI prog_name\fR \fR
.sp
The
\fB mysqladmin\fR
2009-09-16 14:03:18 +02:00
binary to be used to stop servers\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: mysqld option
. \" mysqld option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- mysqld=\fR \fB \fI prog_name\fR \fR
.sp
The
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
binary to be used\& . Note that you can specify
2009-05-25 11:59:47 +02:00
\fB mysqld_safe\fR
2009-09-16 14:03:18 +02:00
as the value for this option also\& . If you use
2009-05-25 11:59:47 +02:00
\fB mysqld_safe\fR
to start the server, you can include the
mysqld
or
ledir
options in the corresponding
[mysqld\fI N\fR ]
2009-09-16 14:03:18 +02:00
option group\& . These options indicate the name of the server that
2009-05-25 11:59:47 +02:00
\fB mysqld_safe\fR
2009-09-16 14:03:18 +02:00
should start and the path name of the directory where the server is located\& . (See the descriptions for these options in
\fB mysqld_safe\fR (1)\& .) Example:
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
[mysqld38]
mysqld = mysqld\- debug
ledir = /opt/local/mysql/libexec
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
.RE
. \}
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: no-log option
. \" no-log option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- no\- log\fR
.sp
Print log information to
stdout
2009-09-16 14:03:18 +02:00
rather than to the log file\& . By default, output goes to the log file\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: password option
. \" password option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- password=\fR \fB \fI password\fR \fR
.sp
2015-09-10 20:12:50 +02:00
The password of the MariaDB account to use when invoking
\fB mysqladmin\fR \& . Note that the password value is not optional for this option, unlike for other MariaDB programs\& .
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: silent option
. \" silent option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- silent\fR
.sp
2009-09-16 14:03:18 +02:00
Silent mode; disable warnings\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: tcp-ip option
. \" tcp-ip option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- tcp\- ip\fR
.sp
2015-09-10 20:12:50 +02:00
Connect to the MariaDB server(s) via the TCP/IP port instead of the UNIX socket\& . This affects stopping
and reporting. If a socket file is missing, the server may still be running, but can be accessed only
via the TCP/IP port\& . By default connecting is done via the UNIX socket\& . This option affects
stop and report operations\& .
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: user option
. \" user option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- user=\fR \fB \fI user_name\fR \fR
.sp
2015-09-10 20:12:50 +02:00
The user name of the MariaDB account to use when invoking
2009-09-16 14:03:18 +02:00
\fB mysqladmin\fR \& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: verbose option
. \" verbose option: mysqld_multi
2009-05-25 11:59:47 +02:00
\fB \- \- verbose\fR
.sp
2009-09-16 14:03:18 +02:00
Be more verbose\& .
.RE
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: version option
. \" version option: mysqld_multi
\fB \- \- version\fR
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
Display version information and exit\& .
2009-05-25 11:59:47 +02:00
.RE
2016-12-07 10:58:40 +01:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqld_multi: wsrep-new-cluster option
. \" wsrep-new-cluster option: mysqld_multi
\fB \- \- wsrep\- new\- cluster\fR
.sp
Bootstrap a cluster\& .
.RE
2009-05-25 11:59:47 +02:00
.PP
Some notes about
\fB mysqld_multi\fR :
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
\fB Most important\fR : Before using
\fB mysqld_multi\fR
be sure that you understand the meanings of the options that are passed to the
\fB mysqld\fR
servers and
\fI why\fR
you would want to have separate
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
processes\& . Beware of the dangers of using multiple
2009-05-25 11:59:47 +02:00
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
servers with the same data directory\& . Use separate data directories, unless you
2009-05-25 11:59:47 +02:00
\fI know\fR
2009-09-16 14:03:18 +02:00
what you are doing\& . Starting multiple servers with the same data directory does
2009-05-25 11:59:47 +02:00
\fI not\fR
2015-09-10 20:12:50 +02:00
give you extra performance in a threaded system\& .
.sp .5v
.RE
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2015-09-10 20:12:50 +02:00
\fB Important\fR : Make sure that the data directory for each server is fully accessible to the Unix account that the specific
2009-05-25 11:59:47 +02:00
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
process is started as\& .
2009-05-25 11:59:47 +02:00
\fI Do not\fR
use the Unix
\fI root\fR
account for this, unless you
\fI know\fR
2015-09-10 20:12:50 +02:00
what you are doing\& .
2009-09-16 14:03:18 +02:00
.sp .5v
.RE
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2015-09-10 20:12:50 +02:00
Make sure that the MariaDB account used for stopping the
2009-05-25 11:59:47 +02:00
\fB mysqld\fR
servers (with the
\fB mysqladmin\fR
2009-09-16 14:03:18 +02:00
program) has the same user name and password for each server\& . Also, make sure that the account has the
2009-05-25 11:59:47 +02:00
SHUTDOWN
2009-09-16 14:03:18 +02:00
privilege\& . If the servers that you want to manage have different user names or passwords for the administrative accounts, you might want to create an account on each server that has the same user name and password\& . For example, you might set up a common
2009-05-25 11:59:47 +02:00
multi_admin
account by executing the following commands for each server:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2009-09-16 14:03:18 +02:00
shell> \fB mysql \- u root \- S /tmp/mysql\& .sock \- p\fR
2009-05-25 11:59:47 +02:00
Enter password:
2009-09-16 14:03:18 +02:00
mysql> \fB GRANT SHUTDOWN ON *\& .*\fR
\- > \fB TO \' multi_admin\' @\' localhost\' IDENTIFIED BY \' multipass\' ;\fR
2009-05-25 11:59:47 +02:00
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
.sp
2015-09-10 20:12:50 +02:00
Change the connection parameters appropriately when connecting to each one\& . Note that the host name part of the account name must allow you to connect as
2009-05-25 11:59:47 +02:00
multi_admin
from the host where you want to run
2009-09-16 14:03:18 +02:00
\fB mysqld_multi\fR \& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
The Unix socket file and the TCP/IP port number must be different for every
2009-09-16 14:03:18 +02:00
\fB mysqld\fR \& . (Alternatively, if the host has multiple network addresses, you can use
2009-05-25 11:59:47 +02:00
\fB \- \- bind\- address\fR
2009-09-16 14:03:18 +02:00
to cause different servers to listen to different interfaces\& .)
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
The
\fB \- \- pid\- file\fR
option is very important if you are using
\fB mysqld_safe\fR
to start
\fB mysqld\fR
(for example,
\fB \- \- mysqld=mysqld_safe\fR ) Every
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
should have its own process ID file\& . The advantage of using
2009-05-25 11:59:47 +02:00
\fB mysqld_safe\fR
instead of
\fB mysqld\fR
is that
\fB mysqld_safe\fR
monitors its
\fB mysqld\fR
process and restarts it if the process terminates due to a signal sent using
kill \- 9
2009-09-16 14:03:18 +02:00
or for other reasons, such as a segmentation fault\& . Please note that the
2009-05-25 11:59:47 +02:00
\fB mysqld_safe\fR
2009-09-16 14:03:18 +02:00
script might require that you start it from a certain place\& . This means that you might have to change location to a certain directory before running
\fB mysqld_multi\fR \& . If you have problems starting, please see the
2009-05-25 11:59:47 +02:00
\fB mysqld_safe\fR
2009-09-16 14:03:18 +02:00
script\& . Check especially the lines:
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \-
MY_PWD=`pwd`
# Check if we are starting this relative (for the binary release)
2009-09-16 14:03:18 +02:00
if test \- d $MY_PWD/data/mysql \- a \e
\- f \& ./share/mysql/english/errmsg\& .sys \- a \e
\- x \& ./bin/mysqld
2009-05-25 11:59:47 +02:00
\- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \- \-
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
.sp
The test performed by these lines should be successful, or you might encounter problems\& . See
\fB mysqld_safe\fR (1)\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
You might want to use the
\fB \- \- user\fR
option for
\fB mysqld\fR , but to do this you need to run the
\fB mysqld_multi\fR
script as the Unix
root
2009-09-16 14:03:18 +02:00
user\& . Having the option in the option file doesn\' t matter; you just get a warning if you are not the superuser and the
2009-05-25 11:59:47 +02:00
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
processes are started under your own Unix account\& .
2009-05-25 11:59:47 +02:00
.RE
.PP
The following example shows how you might set up an option file for use with
2009-09-16 14:03:18 +02:00
\fB mysqld_multi\fR \& . The order in which the
2009-05-25 11:59:47 +02:00
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
programs are started or stopped depends on the order in which they appear in the option file\& . Group numbers need not form an unbroken sequence\& . The first and fifth
2009-05-25 11:59:47 +02:00
[mysqld\fI N\fR ]
groups were intentionally omitted from the example to illustrate that you can have
\(lq gaps\(rq
2009-09-16 14:03:18 +02:00
in the option file\& . This gives you more flexibility\& .
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2009-09-16 14:03:18 +02:00
# This file should probably be in your home dir (~/\& .my\& .cnf)
# or /etc/my\& .cnf
# Version 2\& .1 by Jani Tolonen
2009-05-25 11:59:47 +02:00
[mysqld_multi]
mysqld = /usr/local/bin/mysqld_safe
mysqladmin = /usr/local/bin/mysqladmin
user = multi_admin
password = multipass
[mysqld2]
2009-09-16 14:03:18 +02:00
socket = /tmp/mysql\& .sock2
2009-05-25 11:59:47 +02:00
port = 3307
2009-09-16 14:03:18 +02:00
pid\- file = /usr/local/mysql/var2/hostname\& .pid2
2009-05-25 11:59:47 +02:00
datadir = /usr/local/mysql/var2
language = /usr/local/share/mysql/english
user = john
[mysqld3]
2009-09-16 14:03:18 +02:00
socket = /tmp/mysql\& .sock3
2009-05-25 11:59:47 +02:00
port = 3308
2009-09-16 14:03:18 +02:00
pid\- file = /usr/local/mysql/var3/hostname\& .pid3
2009-05-25 11:59:47 +02:00
datadir = /usr/local/mysql/var3
language = /usr/local/share/mysql/swedish
user = monty
[mysqld4]
2009-09-16 14:03:18 +02:00
socket = /tmp/mysql\& .sock4
2009-05-25 11:59:47 +02:00
port = 3309
2009-09-16 14:03:18 +02:00
pid\- file = /usr/local/mysql/var4/hostname\& .pid4
2009-05-25 11:59:47 +02:00
datadir = /usr/local/mysql/var4
language = /usr/local/share/mysql/estonia
user = tonu
[mysqld6]
2009-09-16 14:03:18 +02:00
socket = /tmp/mysql\& .sock6
2009-05-25 11:59:47 +02:00
port = 3311
2009-09-16 14:03:18 +02:00
pid\- file = /usr/local/mysql/var6/hostname\& .pid6
2009-05-25 11:59:47 +02:00
datadir = /usr/local/mysql/var6
language = /usr/local/share/mysql/japanese
user = jani
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
.SH "COPYRIGHT"
2009-09-16 14:03:18 +02:00
.br
2009-05-25 11:59:47 +02:00
.PP
2016-12-07 10:58:40 +01:00
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2016 MariaDB Foundation
2009-05-25 11:59:47 +02:00
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
2009-09-16 14:03:18 +02:00
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
2009-05-25 11:59:47 +02:00
.SH "SEE ALSO"
2015-09-09 14:32:52 +02:00
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
2009-05-25 11:59:47 +02:00
.SH AUTHOR
2015-09-09 14:32:52 +02:00
MariaDB Foundation (http://www.mariadb.org/).