<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="mysqld-multi">
      </a>
      6.3.4 mysqld_multi — Manage Multiple MySQL Servers
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045321240832">
  </a>
  <a class="indexterm" name="idm46045321239920">
  </a>
  <a class="indexterm" name="idm46045321238560">
  </a>
  <a class="indexterm" name="idm46045321237616">
  </a>
  <p>
   <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
    <span class="command">
     <strong>
      mysqld_multi
     </strong>
    </span>
   </a>
   is designed to manage several
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   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.
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    For some Linux platforms, MySQL installation from RPM or
          Debian packages includes systemd support for managing MySQL
          server startup and shutdown. On these platforms,
    <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
     <span class="command">
      <strong>
       mysqld_multi
      </strong>
     </span>
    </a>
    is not installed because it is
          unnecessary. For information about using systemd to handle
          multiple MySQL instances, see
    <a class="xref" href="using-systemd.html" title="2.5.9 Managing MySQL Server with systemd">
     Section 2.5.9, “Managing MySQL Server with systemd”
    </a>
    .
   </p>
  </div>
  <p>
   <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
    <span class="command">
     <strong>
      mysqld_multi
     </strong>
    </span>
   </a>
   searches for groups named
   <code class="literal">
    [mysqld
    <em class="replaceable">
     <code>
      N
     </code>
    </em>
    ]
   </code>
   in
   <code class="filename">
    my.cnf
   </code>
   (or in the file named by the
   <a class="link" href="mysqld-multi.html#option_mysqld_multi_defaults-file">
    <code class="option">
     --defaults-file
    </code>
   </a>
   option).
   <em class="replaceable">
    <code>
     N
    </code>
   </em>
   can be any positive integer. This
        number is referred to in the following discussion as the option
        group number, or
   <em class="replaceable">
    <code>
     GNR
    </code>
   </em>
   . Group numbers
        distinguish option groups from one another and are used as
        arguments to
   <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
    <span class="command">
     <strong>
      mysqld_multi
     </strong>
    </span>
   </a>
   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
   <code class="literal">
    [mysqld]
   </code>
   group used for starting
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   . (See, for example,
   <a class="xref" href="automatic-start.html" title="2.9.5 Starting and Stopping MySQL Automatically">
    Section 2.9.5, “Starting and Stopping MySQL Automatically”
   </a>
   .) 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
   <a class="xref" href="multiple-servers.html" title="7.8 Running Multiple MySQL Instances on One Machine">
    Section 7.8, “Running Multiple MySQL Instances on One Machine”
   </a>
   .
  </p>
  <p>
   To invoke
   <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
    <span class="command">
     <strong>
      mysqld_multi
     </strong>
    </span>
   </a>
   , use the following
        syntax:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa20955579"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqld_multi <span class="token punctuation">[</span><em class="replaceable">options</em><span class="token punctuation">]</span> <span class="token punctuation">{</span>start|stop|reload|report<span class="token punctuation">}</span> <span class="token punctuation">[</span><em class="replaceable">GNR</em><span class="token punctuation">[</span><span class="token punctuation">,</span><em class="replaceable">GNR</em><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span></code></pre>
  </div>
  <p>
   <code class="literal">
    start
   </code>
   ,
   <code class="literal">
    stop
   </code>
   ,
   <code class="literal">
    reload
   </code>
   (stop and restart), and
   <code class="literal">
    report
   </code>
   indicate which operation to perform.
        You can perform the designated operation for a single server or
        multiple servers, depending on the
   <em class="replaceable">
    <code>
     GNR
    </code>
   </em>
   list that follows the option
        name. If there is no list,
   <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
    <span class="command">
     <strong>
      mysqld_multi
     </strong>
    </span>
   </a>
   performs the operation for all servers in the option file.
  </p>
  <p>
   Each
   <em class="replaceable">
    <code>
     GNR
    </code>
   </em>
   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
   <em class="replaceable">
    <code>
     GNR
    </code>
   </em>
   for a group named
   <code class="literal">
    [mysqld17]
   </code>
   is
   <code class="literal">
    17
   </code>
   . To
        specify a range of numbers, separate the first and last numbers
        by a dash. The
   <em class="replaceable">
    <code>
     GNR
    </code>
   </em>
   value
   <code class="literal">
    10-13
   </code>
   represents groups
   <code class="literal">
    [mysqld10]
   </code>
   through
   <code class="literal">
    [mysqld13]
   </code>
   . 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
   <em class="replaceable">
    <code>
     GNR
    </code>
   </em>
   list; anything after a whitespace
        character is ignored.
  </p>
  <p>
   This command starts a single server using option group
   <code class="literal">
    [mysqld17]
   </code>
   :
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa155460"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqld_multi start 17</code></pre>
  </div>
  <p>
   This command stops several servers, using option groups
   <code class="literal">
    [mysqld8]
   </code>
   and
   <code class="literal">
    [mysqld10]
   </code>
   through
   <code class="literal">
    [mysqld13]
   </code>
   :
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa87031173"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqld_multi stop 8<span class="token punctuation">,</span>10-13</code></pre>
  </div>
  <p>
   For an example of how you might set up an option file, use this
        command:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa2113699"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqld_multi <span class="token property">--example</span></code></pre>
  </div>
  <p>
   <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
    <span class="command">
     <strong>
      mysqld_multi
     </strong>
    </span>
   </a>
   searches for option files as
        follows:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_no-defaults">
      </a>
      With
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_no-defaults">
       <code class="option">
        --no-defaults
       </code>
      </a>
      , no
            option files are read.
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for no-defaults">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --no-defaults
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321183152">
     </a>
     <a class="indexterm" name="idm46045321181664">
     </a>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_defaults-file">
      </a>
      With
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_defaults-file">
       <code class="option">
        --defaults-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
      ,
            only the named file is read.
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for defaults-file">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --defaults-file=filename
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           [none]
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321167552">
     </a>
     <a class="indexterm" name="idm46045321166064">
     </a>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_defaults-extra-file">
      </a>
      Otherwise, option files in the standard list of locations
            are read, including any file named by the
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_defaults-extra-file">
       <code class="option">
        --defaults-extra-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
      option, if one is given. (If the option is given multiple
            times, the last value is used.)
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for defaults-extra-file">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --defaults-extra-file=filename
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           [none]
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321151648">
     </a>
     <a class="indexterm" name="idm46045321150144">
     </a>
    </li>
   </ul>
  </div>
  <p>
   For additional information about these and other option-file
        options, see
   <a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
    Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
   </a>
   .
  </p>
  <p>
   Option files read are searched for
   <code class="literal">
    [mysqld_multi]
   </code>
   and
   <code class="literal">
    [mysqld
    <em class="replaceable">
     <code>
      N
     </code>
    </em>
    ]
   </code>
   option
        groups. The
   <code class="literal">
    [mysqld_multi]
   </code>
   group can be used
        for options to
   <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
    <span class="command">
     <strong>
      mysqld_multi
     </strong>
    </span>
   </a>
   itself.
   <code class="literal">
    [mysqld
    <em class="replaceable">
     <code>
      N
     </code>
    </em>
    ]
   </code>
   groups
        can be used for options passed to specific
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   instances.
  </p>
  <p>
   The
   <code class="literal">
    [mysqld]
   </code>
   or
   <code class="literal">
    [mysqld_safe]
   </code>
   groups can be used for common
        options read by all instances of
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   or
   <a class="link" href="mysqld-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
    <span class="command">
     <strong>
      mysqld_safe
     </strong>
    </span>
   </a>
   . You can specify a
   <a class="link" href="server-options.html#option_mysqld_defaults-file">
    <code class="option">
     --defaults-file=
     <em class="replaceable">
      <code>
       file_name
      </code>
     </em>
    </code>
   </a>
   option to use a different configuration file for that instance,
        in which case the
   <code class="literal">
    [mysqld]
   </code>
   or
   <code class="literal">
    [mysqld_safe]
   </code>
   groups from that file are used
        for that instance.
  </p>
  <p>
   <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
    <span class="command">
     <strong>
      mysqld_multi
     </strong>
    </span>
   </a>
   supports the following options.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_help">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_help">
       <code class="option">
        --help
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for help">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --help
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321119200">
     </a>
     <a class="indexterm" name="idm46045321117712">
     </a>
     <p>
      Display a help message and exit.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_example">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_example">
       <code class="option">
        --example
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for example">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --example
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321103456">
     </a>
     <a class="indexterm" name="idm46045321101968">
     </a>
     <p>
      Display a sample option file.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_log">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_log">
       <code class="option">
        --log=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for log">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --log=path
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           /var/log/mysqld_multi.log
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321087472">
     </a>
     <a class="indexterm" name="idm46045321085984">
     </a>
     <p>
      Specify the name of the log file. If the file exists, log
            output is appended to it.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_mysqladmin">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_mysqladmin">
       <code class="option">
        --mysqladmin=
        <em class="replaceable">
         <code>
          prog_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for mysqladmin">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --mysqladmin=file
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           [none]
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321071424">
     </a>
     <a class="indexterm" name="idm46045321069936">
     </a>
     <p>
      The
      <a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
       <span class="command">
        <strong>
         mysqladmin
        </strong>
       </span>
      </a>
      binary to be used to stop
            servers.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_mysqld">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_mysqld">
       <code class="option">
        --mysqld=
        <em class="replaceable">
         <code>
          prog_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for mysqld">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --mysqld=file
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           [none]
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321054160">
     </a>
     <a class="indexterm" name="idm46045321052672">
     </a>
     <p>
      The
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      binary to be used. Note that
            you can specify
      <a class="link" href="mysqld-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
       <span class="command">
        <strong>
         mysqld_safe
        </strong>
       </span>
      </a>
      as the value
            for this option also. If you use
      <a class="link" href="mysqld-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
       <span class="command">
        <strong>
         mysqld_safe
        </strong>
       </span>
      </a>
      to start the server, you can
            include the
      <code class="literal">
       mysqld
      </code>
      or
      <code class="literal">
       ledir
      </code>
      options in the corresponding
      <code class="literal">
       [mysqld
       <em class="replaceable">
        <code>
         N
        </code>
       </em>
       ]
      </code>
      option group. These options indicate the name of the server
            that
      <a class="link" href="mysqld-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
       <span class="command">
        <strong>
         mysqld_safe
        </strong>
       </span>
      </a>
      should start and the
            path name of the directory where the server is located. (See
            the descriptions for these options in
      <a class="xref" href="mysqld-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
       Section 6.3.2, “mysqld_safe — MySQL Server Startup Script”
      </a>
      .) Example:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ini"><div class="docs-select-all right" id="sa74266999"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token selector">[mysqld38]</span>
<span class="token constant">mysqld</span> <span class="token attr-value"><span class="token punctuation">=</span> mysqld-debug</span>
<span class="token constant">ledir</span>  <span class="token attr-value"><span class="token punctuation">=</span> /opt/local/mysql/libexec</span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_no-log">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_no-log">
       <code class="option">
        --no-log
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for no-log">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --no-log
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321028960">
     </a>
     <a class="indexterm" name="idm46045321027472">
     </a>
     <p>
      Print log information to
      <code class="literal">
       stdout
      </code>
      rather
            than to the log file. By default, output goes to the log
            file.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_password">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_password">
       <code class="option">
        --password=
        <em class="replaceable">
         <code>
          password
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for password">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --password=string
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           [none]
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321012144">
     </a>
     <a class="indexterm" name="idm46045321010656">
     </a>
     <p>
      The password of the MySQL account to use when invoking
      <a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
       <span class="command">
        <strong>
         mysqladmin
        </strong>
       </span>
      </a>
      . Note that the password value
            is not optional for this option, unlike for other MySQL
            programs.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_silent">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_silent">
       <code class="option">
        --silent
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for silent">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --silent
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320995104">
     </a>
     <a class="indexterm" name="idm46045320993616">
     </a>
     <p>
      Silent mode; disable warnings.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_tcp-ip">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_tcp-ip">
       <code class="option">
        --tcp-ip
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for tcp-ip">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --tcp-ip
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320979424">
     </a>
     <a class="indexterm" name="idm46045320977936">
     </a>
     <p>
      Connect to each MySQL server through the TCP/IP port instead
            of the Unix socket file. (If a socket file is missing, the
            server might still be running, but accessible only through
            the TCP/IP port.) By default, connections are made using the
            Unix socket file. This option affects
      <code class="literal">
       stop
      </code>
      and
      <code class="literal">
       report
      </code>
      operations.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_user">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_user">
       <code class="option">
        --user=
        <em class="replaceable">
         <code>
          user_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for user">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --user=name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           root
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320961648">
     </a>
     <a class="indexterm" name="idm46045320960160">
     </a>
     <p>
      The user name of the MySQL account to use when invoking
      <a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
       <span class="command">
        <strong>
         mysqladmin
        </strong>
       </span>
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_verbose">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_verbose">
       <code class="option">
        --verbose
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for verbose">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --verbose
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320944656">
     </a>
     <a class="indexterm" name="idm46045320943168">
     </a>
     <p>
      Be more verbose.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_multi_version">
      </a>
      <a class="link" href="mysqld-multi.html#option_mysqld_multi_version">
       <code class="option">
        --version
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for version">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --version
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Boolean
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           false
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045320928928">
     </a>
     <a class="indexterm" name="idm46045320927440">
     </a>
     <p>
      Display version information and exit.
     </p>
    </li>
   </ul>
  </div>
  <p>
   Some notes about
   <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
    <span class="command">
     <strong>
      mysqld_multi
     </strong>
    </span>
   </a>
   :
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <span class="bold">
       <strong>
        Most important
       </strong>
      </span>
      : Before
            using
      <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
       <span class="command">
        <strong>
         mysqld_multi
        </strong>
       </span>
      </a>
      be sure that you
            understand the meanings of the options that are passed to
            the
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      servers and
      <span class="emphasis">
       <em>
        why
       </em>
      </span>
      you would want to have separate
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      processes. Beware of the dangers
            of using multiple
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      servers with the
            same data directory. Use separate data directories, unless
            you
      <span class="emphasis">
       <em>
        know
       </em>
      </span>
      what you are doing. Starting
            multiple servers with the same data directory does
      <span class="emphasis">
       <em>
        not
       </em>
      </span>
      give you extra performance in a
            threaded system. See
      <a class="xref" href="multiple-servers.html" title="7.8 Running Multiple MySQL Instances on One Machine">
       Section 7.8, “Running Multiple MySQL Instances on One Machine”
      </a>
      .
     </p>
     <div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Important
      </div>
      <p>
       Make sure that the data directory for each server is fully
              accessible to the Unix account that the specific
       <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
        <span class="command">
         <strong>
          mysqld
         </strong>
        </span>
       </a>
       process is started as.
       <span class="emphasis">
        <em>
         Do not
        </em>
       </span>
       use the Unix
       <em class="replaceable">
        <code>
         root
        </code>
       </em>
       account for this, unless
              you
       <span class="emphasis">
        <em>
         know
        </em>
       </span>
       what you are doing. See
       <a class="xref" href="changing-mysql-user.html" title="8.1.5 How to Run MySQL as a Normal User">
        Section 8.1.5, “How to Run MySQL as a Normal User”
       </a>
       .
      </p>
     </div>
    </li>
    <li class="listitem">
     <p>
      Make sure that the MySQL account used for stopping the
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      servers (with the
      <a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
       <span class="command">
        <strong>
         mysqladmin
        </strong>
       </span>
      </a>
      program) has the same user
            name and password for each server. Also, make sure that the
            account has the
      <a class="link" href="privileges-provided.html#priv_shutdown">
       <code class="literal">
        SHUTDOWN
       </code>
      </a>
      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
      <code class="literal">
       multi_admin
      </code>
      account
            by executing the following commands for each server:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa99522857"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">mysql</span> <span class="token property">-u</span> root <span class="token property">-S</span> /tmp/mysql<span class="token punctuation">.</span>sock <span class="token property">-p</span>
Enter password<span class="token punctuation">:</span>
<span class="token prompt">mysql&gt;</span><span class="token command"> CREATE</span> USER <span class="token atrule">'multi_admin'</span>@<span class="token atrule">'localhost'</span> IDENTIFIED BY <span class="token atrule">'multipass'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql&gt;</span><span class="token command"> GRANT</span> SHUTDOWN ON *<span class="token punctuation">.</span>* TO <span class="token atrule">'multi_admin'</span>@<span class="token atrule">'localhost'</span><span class="token punctuation">;</span></code></pre>
     </div>
     <p>
      See
      <a class="xref" href="access-control.html" title="8.2 Access Control and Account Management">
       Section 8.2, “Access Control and Account Management”
      </a>
      . You have to do this
            for each
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      server. Change the
            connection parameters appropriately when connecting to each
            one. Note that the host name part of the account name must
            permit you to connect as
      <code class="literal">
       multi_admin
      </code>
      from
            the host where you want to run
      <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
       <span class="command">
        <strong>
         mysqld_multi
        </strong>
       </span>
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      The Unix socket file and the TCP/IP port number must be
            different for every
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      .
            (Alternatively, if the host has multiple network addresses,
            you can set the
      <a class="link" href="server-system-variables.html#sysvar_bind_address">
       <code class="literal">
        bind_address
       </code>
      </a>
      system
            variable to cause different servers to listen to different
            interfaces.)
     </p>
    </li>
    <li class="listitem">
     <p>
      The
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_pid-file">
       <code class="option">
        --pid-file
       </code>
      </a>
      option is
            very important if you are using
      <a class="link" href="mysqld-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
       <span class="command">
        <strong>
         mysqld_safe
        </strong>
       </span>
      </a>
      to start
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      (for example,
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld">
       <code class="option">
        --mysqld=mysqld_safe
       </code>
      </a>
      )
            Every
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      should have its own process
            ID file. The advantage of using
      <a class="link" href="mysqld-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
       <span class="command">
        <strong>
         mysqld_safe
        </strong>
       </span>
      </a>
      instead of
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      is that
      <a class="link" href="mysqld-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
       <span class="command">
        <strong>
         mysqld_safe
        </strong>
       </span>
      </a>
      monitors its
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      process and restarts it if the
            process terminates due to a signal sent using
      <code class="literal">
       kill
            -9
      </code>
      or for other reasons, such as a segmentation
            fault.
     </p>
    </li>
    <li class="listitem">
     <p>
      You might want to use the
      <a class="link" href="server-options.html#option_mysqld_user">
       <code class="option">
        --user
       </code>
      </a>
      option for
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      , but to do this you need to run
            the
      <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
       <span class="command">
        <strong>
         mysqld_multi
        </strong>
       </span>
      </a>
      script as the Unix
            superuser (
      <code class="literal">
       root
      </code>
      ). Having the option in
            the option file doesn't matter; you just get a warning if
            you are not the superuser and the
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      processes are started under your own Unix account.
     </p>
    </li>
   </ul>
  </div>
  <p>
   The following example shows how you might set up an option file
        for use with
   <a class="link" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
    <span class="command">
     <strong>
      mysqld_multi
     </strong>
    </span>
   </a>
   . The order in which
        the
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   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
   <code class="literal">
    [mysqld
    <em class="replaceable">
     <code>
      N
     </code>
    </em>
    ]
   </code>
   groups were intentionally omitted from the example to illustrate
        that you can have
   <span class="quote">
    “
    <span class="quote">
     gaps
    </span>
    ”
   </span>
   in the option file. This
        gives you more flexibility.
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-ini"><div class="docs-select-all right" id="sa46676424"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token comment" spellcheck="true"># This is an example of a my.cnf file for mysqld_multi.</span>
<span class="token comment" spellcheck="true"># Usually this file is located in home dir ~/.my.cnf or /etc/my.cnf</span>

<span class="token selector">[mysqld_multi]</span>
<span class="token constant">mysqld</span>     <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/bin/mysqld_safe</span>
<span class="token constant">mysqladmin</span> <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/bin/mysqladmin</span>
<span class="token constant">user</span>       <span class="token attr-value"><span class="token punctuation">=</span> multi_admin</span>
<span class="token constant">password</span>   <span class="token attr-value"><span class="token punctuation">=</span> my_password</span>

<span class="token selector">[mysqld2]</span>
<span class="token constant">socket</span>     <span class="token attr-value"><span class="token punctuation">=</span> /tmp/mysql.sock2</span>
<span class="token constant">port</span>       <span class="token attr-value"><span class="token punctuation">=</span> 3307</span>
<span class="token constant">pid-file</span>   <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/data2/hostname.pid2</span>
<span class="token constant">datadir</span>    <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/data2</span>
<span class="token constant">language</span>   <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/share/mysql/english</span>
<span class="token constant">user</span>       <span class="token attr-value"><span class="token punctuation">=</span> unix_user1</span>

<span class="token selector">[mysqld3]</span>
<span class="token constant">mysqld</span>     <span class="token attr-value"><span class="token punctuation">=</span> /path/to/mysqld_safe</span>
<span class="token constant">ledir</span>      <span class="token attr-value"><span class="token punctuation">=</span> /path/to/mysqld-binary/</span>
<span class="token constant">mysqladmin</span> <span class="token attr-value"><span class="token punctuation">=</span> /path/to/mysqladmin</span>
<span class="token constant">socket</span>     <span class="token attr-value"><span class="token punctuation">=</span> /tmp/mysql.sock3</span>
<span class="token constant">port</span>       <span class="token attr-value"><span class="token punctuation">=</span> 3308</span>
<span class="token constant">pid-file</span>   <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/data3/hostname.pid3</span>
<span class="token constant">datadir</span>    <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/data3</span>
<span class="token constant">language</span>   <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/share/mysql/swedish</span>
<span class="token constant">user</span>       <span class="token attr-value"><span class="token punctuation">=</span> unix_user2</span>

<span class="token selector">[mysqld4]</span>
<span class="token constant">socket</span>     <span class="token attr-value"><span class="token punctuation">=</span> /tmp/mysql.sock4</span>
<span class="token constant">port</span>       <span class="token attr-value"><span class="token punctuation">=</span> 3309</span>
<span class="token constant">pid-file</span>   <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/data4/hostname.pid4</span>
<span class="token constant">datadir</span>    <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/data4</span>
<span class="token constant">language</span>   <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/share/mysql/estonia</span>
<span class="token constant">user</span>       <span class="token attr-value"><span class="token punctuation">=</span> unix_user3</span>

<span class="token selector">[mysqld6]</span>
<span class="token constant">socket</span>     <span class="token attr-value"><span class="token punctuation">=</span> /tmp/mysql.sock6</span>
<span class="token constant">port</span>       <span class="token attr-value"><span class="token punctuation">=</span> 3311</span>
<span class="token constant">pid-file</span>   <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/data6/hostname.pid6</span>
<span class="token constant">datadir</span>    <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/data6</span>
<span class="token constant">language</span>   <span class="token attr-value"><span class="token punctuation">=</span> /usr/local/mysql/share/mysql/japanese</span>
<span class="token constant">user</span>       <span class="token attr-value"><span class="token punctuation">=</span> unix_user4</span></code></pre>
  </div>
  <p>
   See
   <a class="xref" href="option-files.html" title="6.2.2.2 Using Option Files">
    Section 6.2.2.2, “Using Option Files”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
