Name
mysqld_multi
Synopsis
mysqld_multi [options] {start|stop|report} [server_id]
This option runs multiple MySQL servers on different socket
files and ports. To set up multiple servers, you must create a section
for each server in a configuration file (e.g., /etc/my.cnf). The naming scheme for
each section must be
[mysqldn],
where n is a different number for each
server. You must enter options separately for each server in its own
section, even when servers use the same options. At a minimum, each
server should use a different socket file or a different TCP/IP port.
You should also use different data directories for each server. The
directory should be accessible to the operating system user who
started the utility. It should not be the root
user, though, as this would be a security vulnerability. To see an
example of how a configuration file might be set up for multiple
servers, enter the following from the command line:
mysqld_multi --example
Once you have configured multiple servers, you can enter something like the following from the command line to start a server:
mysqld_multi start 3
This line would start server number 3, listed in the
configuration file as [mysqld3]. By entering
report for the first argument, you can obtain the
status on the server. For starting and stopping the server, this
script uses the mysqladmin utility. Here is an
alphabetical list of options specific to
mysqld_multi that you can enter from the command
line, along with a brief explanation of each:
--config-file= ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access