mysqld_multi


mysqld_multi

mysqld_multi [options] {start|stop|report} [server_id]

Use this to run multiple MySQL servers on different socket files and ports. To set up multiple servers, a different section of server options must be entered into 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. Options must be entered 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 and a different TCP/IP port. 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 multiple servers have been configured, to start a server, you can enter something like the following from the command line:

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= filename

Specifies the path and name of the server's configuration file if it is different from the default.


--example

Displays a sample configuration file.


--help

Displays basic help information.


--log= filename

Sets the path and name of the logfile. The default is /tmp/mysqld_multi.log.


--mysqladmin= path

Sets the path to the mysqladmin utility.


--mysqld= path

Specifies the path to mysqld.


--no-log

Instructs the utility not to save messages to a log, but to send them to stdout instead.


--password= password

Provides the password for using mysqladmin.


--tcp-ip

Enables TCP/IP communication with the server instead of using a Unix-domain socket.


--user= user

Provides the username for using mysqladmin. The same user must be used for all servers.


--version

Displays the version of the utility.



MySQL in a Nutshell
MYSQL in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596514336
EAN: 2147483647
Year: 2006
Pages: 134
Authors: Russell Dyer

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net