content_image/753971.jpg
## • service-startup-timeout= seconds 

How long in seconds to wait for confirmation of server startup. If the server does not start within this time, mysql.server  exits with an error. The default value is 900. A value of 0 means not to wait at all for startup. Negative values mean to wait forever (no timeout). 

## 4.3.4 mysqld_multi — Manage Multiple MySQL Servers 

mysqld_multi  is designed to manage several mysqld  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. 

<img src='content_image/753971.jpg'>

## Note 

For some Linux platforms, MySQL installation from RPM or Debian packages includes systemd support for managing MySQL server startup and shutdown. On these platforms, mysqld_multi  is not installed because it is unnecessary. For information about using systemd to handle multiple MySQL instances, see Section 2.5.9, “Managing MySQL Server with systemd” . 

mysqld_multi  searches for groups named [mysqld N ]  in my.cnf  (or in the file named by the -- defaults-file  option). N  can be any positive integer. This number is referred to in the following discussion as the option group number, or GNR . Group numbers distinguish option groups from one another and are used as arguments to mysqld_multi  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 [mysqld] group used for starting mysqld . (See, for example, Section 2.10.5, “Starting and Stopping MySQL Automatically” .) 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. For more information on which options must be unique per server in a multiple-server environment, see Section 5.8, “Running Multiple MySQL Instances on One Machine” . 

To invoke mysqld_multi , use the following syntax: 

mysqld_multi [ options ] {start|stop|reload|report} [ GNR [, GNR ] ...] 

start , stop , reload  (stop and restart), and report  indicate which operation to perform. You can perform the designated operation for a single server or multiple servers, depending on the GNR  list that follows the option name. If there is no list, mysqld_multi  performs the operation for all servers in the option file. 

Each GNR  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 GNR  for a group named [mysqld17]  is 17 . To specify a range of numbers, separate the first and last numbers by a dash. The GNR  value 10-13  represents groups [mysqld10]  through [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 GNR  list; anything after a whitespace character is ignored. 

This command starts a single server using option group [mysqld17] : 

mysqld_multi start 17 

This command stops several servers, using option groups [mysqld8]  and [mysqld10]  through [mysqld13] : 

mysqld_multi stop 8,10-13 

For an example of how you might set up an option file, use this command: 

mysqld_multi --example 

