<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="mysqld-safe">
      </a>
      6.3.2 mysqld_safe — MySQL Server Startup Script
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045322000112">
  </a>
  <a class="indexterm" name="idm46045321999200">
  </a>
  <a class="indexterm" name="idm46045321997840">
  </a>
  <p>
   <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>
   is the recommended way to start a
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   server on Unix.
   <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>
   adds some safety features such as
        restarting the server when an error occurs and logging runtime
        information to an error log. A description of error logging is
        given later in this section.
  </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-safe.html" title="6.3.2 mysqld_safe — MySQL Server Startup Script">
     <span class="command">
      <strong>
       mysqld_safe
      </strong>
     </span>
    </a>
    is not installed because it is
          unnecessary. For more information, 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>
   <p>
    One implication of the non-use of
    <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>
    on platforms that use systemd
          for server management is that use of
    <code class="literal">
     [mysqld_safe]
    </code>
    or
    <code class="literal">
     [safe_mysqld]
    </code>
    sections in option files is
          not supported and might lead to unexpected behavior.
   </p>
  </div>
  <p>
   <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>
   tries to start an executable
        named
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   . To override the default
        behavior and specify explicitly the name of the server you want
        to run, specify a
   <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld">
    <code class="option">
     --mysqld
    </code>
   </a>
   or
   <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld-version">
    <code class="option">
     --mysqld-version
    </code>
   </a>
   option
        to
   <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 also use
   <a class="link" href="mysqld-safe.html#option_mysqld_safe_ledir">
    <code class="option">
     --ledir
    </code>
   </a>
   to indicate the
        directory where
   <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 look for
        the server.
  </p>
  <p>
   Many of the options to
   <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>
   are the
        same as the options to
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   . See
   <a class="xref" href="server-options.html" title="7.1.7 Server Command Options">
    Section 7.1.7, “Server Command Options”
   </a>
   .
  </p>
  <p>
   Options unknown to
   <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>
   are passed to
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   if they are specified on the command
        line, but ignored if they are specified in the
   <code class="literal">
    [mysqld_safe]
   </code>
   group of an option file. 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>
  <p>
   <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>
   reads all options from the
   <code class="literal">
    [mysqld]
   </code>
   ,
   <code class="literal">
    [server]
   </code>
   , and
   <code class="literal">
    [mysqld_safe]
   </code>
   sections in option files. For
        example, if you specify a
   <code class="literal">
    [mysqld]
   </code>
   section
        like this,
   <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>
   finds and uses the
   <a class="link" href="mysqld-safe.html#option_mysqld_safe_log-error">
    <code class="option">
     --log-error
    </code>
   </a>
   option:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-ini"><div class="docs-select-all right" id="sa51435975"><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">[mysqld]</span>
<span class="token constant">log-error</span><span class="token attr-value"><span class="token punctuation">=</span>error.log</span></code></pre>
  </div>
  <p>
   For backward compatibility,
   <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>
   also
        reads
   <code class="literal">
    [safe_mysqld]
   </code>
   sections, but to be
        current you should rename such sections to
   <code class="literal">
    [mysqld_safe]
   </code>
   .
  </p>
  <p>
   <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>
   accepts options on the command
        line and in option files, as described in the following table.
        For information about option files used by MySQL programs, 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 class="table">
   <a name="idm46045321956432">
   </a>
   <p class="title">
    <b>
     Table 6.7 mysqld_safe Options
    </b>
   </p>
   <div class="table-contents">
    <table frame="box" rules="all" summary="Command-line options available for mysqld_safe.">
     <colgroup>
      <col style="width: 35%"/>
      <col style="width: 64%"/>
     </colgroup>
     <thead>
      <tr>
       <th>
        Option Name
       </th>
       <th>
        Description
       </th>
      </tr>
     </thead>
     <tbody>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_basedir">
         --basedir
        </a>
       </td>
       <td>
        Path to MySQL installation directory
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_core-file-size">
         --core-file-size
        </a>
       </td>
       <td>
        Size of core file that mysqld should be able to create
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_datadir">
         --datadir
        </a>
       </td>
       <td>
        Path to data directory
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_defaults-extra-file">
         --defaults-extra-file
        </a>
       </td>
       <td>
        Read named option file in addition to usual option files
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_defaults-file">
         --defaults-file
        </a>
       </td>
       <td>
        Read only named option file
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_help">
         --help
        </a>
       </td>
       <td>
        Display help message and exit
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_ledir">
         --ledir
        </a>
       </td>
       <td>
        Path to directory where server is located
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_log-error">
         --log-error
        </a>
       </td>
       <td>
        Write error log to named file
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_malloc-lib">
         --malloc-lib
        </a>
       </td>
       <td>
        Alternative malloc library to use for mysqld
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld">
         --mysqld
        </a>
       </td>
       <td>
        Name of server program to start (in ledir directory)
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld-safe-log-timestamps">
         --mysqld-safe-log-timestamps
        </a>
       </td>
       <td>
        Timestamp format for logging
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld-version">
         --mysqld-version
        </a>
       </td>
       <td>
        Suffix for server program name
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_nice">
         --nice
        </a>
       </td>
       <td>
        Use nice program to set server scheduling priority
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_no-defaults">
         --no-defaults
        </a>
       </td>
       <td>
        Read no option files
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_open-files-limit">
         --open-files-limit
        </a>
       </td>
       <td>
        Number of files that mysqld should be able to open
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_pid-file">
         --pid-file
        </a>
       </td>
       <td>
        Path name of server process ID file
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_plugin-dir">
         --plugin-dir
        </a>
       </td>
       <td>
        Directory where plugins are installed
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_port">
         --port
        </a>
       </td>
       <td>
        Port number on which to listen for TCP/IP connections
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_skip-kill-mysqld">
         --skip-kill-mysqld
        </a>
       </td>
       <td>
        Do not try to kill stray mysqld processes
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog">
         --skip-syslog
        </a>
       </td>
       <td>
        Do not write error messages to syslog; use error log file
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_socket">
         --socket
        </a>
       </td>
       <td>
        Socket file on which to listen for Unix socket connections
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog">
         --syslog
        </a>
       </td>
       <td>
        Write error messages to syslog
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog-tag">
         --syslog-tag
        </a>
       </td>
       <td>
        Tag suffix for messages written to syslog
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_timezone">
         --timezone
        </a>
       </td>
       <td>
        Set TZ time zone environment variable to named value
       </td>
      </tr>
      <tr>
       <td>
        <a class="link" href="mysqld-safe.html#option_mysqld_safe_user">
         --user
        </a>
       </td>
       <td>
        Run mysqld as user having name user_name or numeric user ID user_id
       </td>
      </tr>
     </tbody>
    </table>
   </div>
   <div class="table-contents">
    <table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 719px;">
     <thead>
      <tr>
       <th style="width: 253.766px;">
        Option Name
       </th>
       <th style="width: 464.047px;">
        Description
       </th>
      </tr>
     </thead>
    </table>
   </div>
  </div>
  <br class="table-break"/>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_help">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_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>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321881040">
     </a>
     <a class="indexterm" name="idm46045321879648">
     </a>
     <p>
      Display a help message and exit.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_basedir">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_basedir">
       <code class="option">
        --basedir=
        <em class="replaceable">
         <code>
          dir_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for basedir">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --basedir=dir_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Directory name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321868480">
     </a>
     <a class="indexterm" name="idm46045321867088">
     </a>
     <p>
      The path to the MySQL installation directory.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_core-file-size">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_core-file-size">
       <code class="option">
        --core-file-size=
        <em class="replaceable">
         <code>
          size
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for core-file-size">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --core-file-size=size
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321855920">
     </a>
     <a class="indexterm" name="idm46045321854528">
     </a>
     <p>
      The size of the core file that
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      should be able to create. The option value is passed to
      <span class="command">
       <strong>
        ulimit -c
       </strong>
      </span>
      .
     </p>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       The
       <a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_in_core_file">
        <code class="literal">
         innodb_buffer_pool_in_core_file
        </code>
       </a>
       variable can be used to reduce the size of core files on
              operating systems that support it. For more information,
              see
       <a class="xref" href="innodb-buffer-pool-in-core-file.html" title="17.8.3.7 Excluding or Including Buffer Pool Pages from Core Files">
        Section 17.8.3.7, “Excluding or Including Buffer Pool Pages from Core Files”
       </a>
       .
      </p>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_datadir">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_datadir">
       <code class="option">
        --datadir=
        <em class="replaceable">
         <code>
          dir_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for datadir">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --datadir=dir_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Directory name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321839296">
     </a>
     <a class="indexterm" name="idm46045321837904">
     </a>
     <p>
      The path to the data directory.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_defaults-extra-file">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_defaults-extra-file">
       <code class="option">
        --defaults-extra-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
     </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=file_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321826816">
     </a>
     <a class="indexterm" name="idm46045321825424">
     </a>
     <p>
      Read this option file in addition to the usual option files.
            If the file does not exist or is otherwise inaccessible, the
            server exits with an error. If
      <em class="replaceable">
       <code>
        file_name
       </code>
      </em>
      is not an absolute path
            name, it is interpreted relative to the current directory.
            This must be the first option on the command line if it is
            used.
     </p>
     <p>
      For additional information about this 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>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_defaults-file">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_defaults-file">
       <code class="option">
        --defaults-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
     </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=file_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321812528">
     </a>
     <a class="indexterm" name="idm46045321811136">
     </a>
     <p>
      Use only the given option file. If the file does not exist
            or is otherwise inaccessible, the server exits with an
            error. If
      <em class="replaceable">
       <code>
        file_name
       </code>
      </em>
      is not an
            absolute path name, it is interpreted relative to the
            current directory. This must be the first option on the
            command line if it is used.
     </p>
     <p>
      For additional information about this 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>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_ledir">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_ledir">
       <code class="option">
        --ledir=
        <em class="replaceable">
         <code>
          dir_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for ledir">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --ledir=dir_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Directory name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321798288">
     </a>
     <a class="indexterm" name="idm46045321796896">
     </a>
     <p>
      If
      <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>
      cannot find the server,
            use this option to indicate the path name to the directory
            where the server is located.
     </p>
     <p>
      This option is accepted only on the command line, not in
            option files. On platforms that use systemd, the value can
            be specified in the value of
      <code class="literal">
       MYSQLD_OPTS
      </code>
      .
            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>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_log-error">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_log-error">
       <code class="option">
        --log-error=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for log-error">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --log-error=file_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321782960">
     </a>
     <a class="indexterm" name="idm46045321781568">
     </a>
     <p>
      Write the error log to the given file. See
      <a class="xref" href="error-log.html" title="7.4.2 The Error Log">
       Section 7.4.2, “The Error Log”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_mysqld-safe-log-timestamps">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld-safe-log-timestamps">
       <code class="option">
        --mysqld-safe-log-timestamps
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for mysqld-safe-log-timestamps">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --mysqld-safe-log-timestamps=type
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Enumeration
         </td>
        </tr>
        <tr>
         <th>
          Default Value
         </th>
         <td>
          <code class="literal">
           utc
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Valid Values
         </th>
         <td>
          <p class="valid-value">
           <code class="literal">
            system
           </code>
          </p>
          <p class="valid-value">
           <code class="literal">
            hyphen
           </code>
          </p>
          <p class="valid-value">
           <code class="literal">
            legacy
           </code>
          </p>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321763360">
     </a>
     <a class="indexterm" name="idm46045321761968">
     </a>
     <p>
      This option controls the format for timestamps in log output
            produced by
      <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>
      . The following
            list describes the permitted values. For any other value,
      <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>
      logs a warning and uses
      <code class="literal">
       UTC
      </code>
      format.
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         <code class="literal">
          UTC
         </code>
         ,
         <code class="literal">
          utc
         </code>
        </p>
        <p>
         ISO 8601 UTC format (same as
         <a class="link" href="server-system-variables.html#sysvar_log_timestamps">
          <code class="option">
           --log_timestamps=UTC
          </code>
         </a>
         for
                the server). This is the default.
        </p>
       </li>
       <li class="listitem">
        <p>
         <code class="literal">
          SYSTEM
         </code>
         ,
         <code class="literal">
          system
         </code>
        </p>
        <p>
         ISO 8601 local time format (same as
         <a class="link" href="server-system-variables.html#sysvar_log_timestamps">
          <code class="option">
           --log_timestamps=SYSTEM
          </code>
         </a>
         for the server).
        </p>
       </li>
       <li class="listitem">
        <p>
         <code class="literal">
          HYPHEN
         </code>
         ,
         <code class="literal">
          hyphen
         </code>
        </p>
        <p>
         <em class="replaceable">
          <code>
           YY-MM-DD h:mm:ss
          </code>
         </em>
         format, as
                in
         <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>
         for MySQL 5.6.
        </p>
       </li>
       <li class="listitem">
        <p>
         <code class="literal">
          LEGACY
         </code>
         ,
         <code class="literal">
          legacy
         </code>
        </p>
        <p>
         <em class="replaceable">
          <code>
           YYMMDD hh:mm:ss
          </code>
         </em>
         format, as in
         <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>
         prior to MySQL 5.6.
        </p>
       </li>
      </ul>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_malloc-lib">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_malloc-lib">
       <code class="option">
        --malloc-lib=[
        <em class="replaceable">
         <code>
          lib_name
         </code>
        </em>
        ]
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for malloc-lib">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --malloc-lib=[lib-name]
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321733440">
     </a>
     <a class="indexterm" name="idm46045321732048">
     </a>
     <a class="indexterm" name="idm46045321730656">
     </a>
     <p>
      The name of the library to use for memory allocation instead
            of the system
      <code class="literal">
       malloc()
      </code>
      library. The
            option value must be one of the directories
      <code class="filename">
       /usr/lib
      </code>
      ,
      <code class="filename">
       /usr/lib64
      </code>
      ,
      <code class="filename">
       /usr/lib/i386-linux-gnu
      </code>
      , or
      <code class="filename">
       /usr/lib/x86_64-linux-gnu
      </code>
      .
     </p>
     <p>
      The
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_malloc-lib">
       <code class="option">
        --malloc-lib
       </code>
      </a>
      option
            works by modifying the
      <code class="literal">
       LD_PRELOAD
      </code>
      environment value to affect dynamic linking to enable the
            loader to find the memory-allocation library when
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      runs:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         If the option is not given, or is given without a value
                (
         <a class="link" href="mysqld-safe.html#option_mysqld_safe_malloc-lib">
          <code class="option">
           --malloc-lib=
          </code>
         </a>
         ),
         <code class="literal">
          LD_PRELOAD
         </code>
         is not modified and no
                attempt is made to use
         <code class="literal">
          tcmalloc
         </code>
         .
        </p>
       </li>
       <li class="listitem">
        <p>
         Prior to MySQL 8.0.21, if the option is given as
         <a class="link" href="mysqld-safe.html#option_mysqld_safe_malloc-lib">
          <code class="option">
           --malloc-lib=tcmalloc
          </code>
         </a>
         ,
         <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>
         looks for a
         <code class="literal">
          tcmalloc
         </code>
         library in
         <code class="filename">
          /usr/lib
         </code>
         . If
         <code class="literal">
          tmalloc
         </code>
         is found, its path name is
                added to the beginning of the
         <code class="literal">
          LD_PRELOAD
         </code>
         value for
         <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
          <span class="command">
           <strong>
            mysqld
           </strong>
          </span>
         </a>
         . If
         <code class="literal">
          tcmalloc
         </code>
         is not found,
         <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>
         aborts with an error.
        </p>
        <p>
         As of MySQL 8.0.21,
         <code class="literal">
          tcmalloc
         </code>
         is not a
                permitted value for the
         <a class="link" href="mysqld-safe.html#option_mysqld_safe_malloc-lib">
          <code class="option">
           --malloc-lib
          </code>
         </a>
         option.
        </p>
       </li>
       <li class="listitem">
        <p>
         If the option is given as
         <a class="link" href="mysqld-safe.html#option_mysqld_safe_malloc-lib">
          <code class="option">
           --malloc-lib=
           <em class="replaceable">
            <code>
             /path/to/some/library
            </code>
           </em>
          </code>
         </a>
         ,
                that full path is added to the beginning of the
         <code class="literal">
          LD_PRELOAD
         </code>
         value. If the full path
                points to a nonexistent or unreadable file,
         <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>
         aborts with an error.
        </p>
       </li>
       <li class="listitem">
        <p>
         For cases where
         <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>
         adds a
                path name to
         <code class="literal">
          LD_PRELOAD
         </code>
         , it adds the
                path to the beginning of any existing value the variable
                already has.
        </p>
       </li>
      </ul>
     </div>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       On systems that manage the server using systemd,
       <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>
       is not available. Instead,
              specify the allocation library by setting
       <code class="literal">
        LD_PRELOAD
       </code>
       in
       <code class="filename">
        /etc/sysconfig/mysql
       </code>
       .
      </p>
     </div>
     <p>
      Linux users can use the
      <code class="filename">
       libtcmalloc_minimal.so
      </code>
      library on any
            platform for which a
      <code class="literal">
       tcmalloc
      </code>
      package is
            installed in
      <code class="filename">
       /usr/lib
      </code>
      by adding these
            lines to the
      <code class="filename">
       my.cnf
      </code>
      file:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ini"><div class="docs-select-all right" id="sa98319342"><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">[mysqld_safe]</span>
<span class="token constant">malloc-lib</span><span class="token attr-value"><span class="token punctuation">=</span>tcmalloc</span></code></pre>
     </div>
     <p>
      To use a specific
      <code class="literal">
       tcmalloc
      </code>
      library,
            specify its full path name. Example:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ini"><div class="docs-select-all right" id="sa95479042"><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">[mysqld_safe]</span>
<span class="token constant">malloc-lib</span><span class="token attr-value"><span class="token punctuation">=</span>/opt/lib/libtcmalloc_minimal.so</span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_mysqld">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_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_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321685504">
     </a>
     <a class="indexterm" name="idm46045321684112">
     </a>
     <p>
      The name of the server program (in the
      <code class="literal">
       ledir
      </code>
      directory) that you want to start.
            This option is needed if you use the MySQL binary
            distribution but have the data directory outside of the
            binary distribution. If
      <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>
      cannot find the server, use the
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_ledir">
       <code class="option">
        --ledir
       </code>
      </a>
      option to
            indicate the path name to the directory where the server is
            located.
     </p>
     <p>
      This option is accepted only on the command line, not in
            option files. On platforms that use systemd, the value can
            be specified in the value of
      <code class="literal">
       MYSQLD_OPTS
      </code>
      .
            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>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_mysqld-version">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld-version">
       <code class="option">
        --mysqld-version=
        <em class="replaceable">
         <code>
          suffix
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for mysqld-version">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --mysqld-version=suffix
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321668448">
     </a>
     <a class="indexterm" name="idm46045321667056">
     </a>
     <p>
      This option is similar to the
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld">
       <code class="option">
        --mysqld
       </code>
      </a>
      option, but you
            specify only the suffix for the server program name. The
            base name is assumed to be
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      . For
            example, if you use
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld-version">
       <code class="option">
        --mysqld-version=debug
       </code>
      </a>
      ,
      <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>
      starts the
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld-debug
        </strong>
       </span>
      </a>
      program in the
      <code class="literal">
       ledir
      </code>
      directory. If the argument to
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_mysqld-version">
       <code class="option">
        --mysqld-version
       </code>
      </a>
      is
            empty,
      <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>
      uses
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      in the
      <code class="literal">
       ledir
      </code>
      directory.
     </p>
     <p>
      This option is accepted only on the command line, not in
            option files. On platforms that use systemd, the value can
            be specified in the value of
      <code class="literal">
       MYSQLD_OPTS
      </code>
      .
            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>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_nice">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_nice">
       <code class="option">
        --nice=
        <em class="replaceable">
         <code>
          priority
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for nice">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --nice=priority
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Numeric
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321645664">
     </a>
     <a class="indexterm" name="idm46045321644272">
     </a>
     <p>
      Use the
      <code class="literal">
       nice
      </code>
      program to set the server's
            scheduling priority to the given value.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_no-defaults">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_no-defaults">
       <code class="option">
        --no-defaults
       </code>
      </a>
     </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>
          String
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321632704">
     </a>
     <a class="indexterm" name="idm46045321631312">
     </a>
     <p>
      Do not read any option files. If program startup fails due
            to reading unknown options from an option file,
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_no-defaults">
       <code class="option">
        --no-defaults
       </code>
      </a>
      can be
            used to prevent them from being read. This must be the first
            option on the command line if it is used.
     </p>
     <p>
      For additional information about this 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>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_open-files-limit">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_open-files-limit">
       <code class="option">
        --open-files-limit=
        <em class="replaceable">
         <code>
          count
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for open-files-limit">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --open-files-limit=count
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321617568">
     </a>
     <a class="indexterm" name="idm46045321616080">
     </a>
     <p>
      The number of files that
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      should be
            able to open. The option value is passed to
      <span class="command">
       <strong>
        ulimit
            -n
       </strong>
      </span>
      .
     </p>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       You must start
       <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
       <code class="literal">
        root
       </code>
       for this to function properly.
      </p>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_pid-file">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_pid-file">
       <code class="option">
        --pid-file=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for pid-file">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --pid-file=file_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321599408">
     </a>
     <a class="indexterm" name="idm46045321597920">
     </a>
     <p>
      The path name that
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      should use for
            its process ID file.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_plugin-dir">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_plugin-dir">
       <code class="option">
        --plugin-dir=
        <em class="replaceable">
         <code>
          dir_name
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for plugin-dir">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --plugin-dir=dir_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Directory name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321584720">
     </a>
     <a class="indexterm" name="idm46045321583232">
     </a>
     <p>
      The path name of the plugin directory.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_port">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_port">
       <code class="option">
        --port=
        <em class="replaceable">
         <code>
          port_num
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for port">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --port=number
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Numeric
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321571312">
     </a>
     <a class="indexterm" name="idm46045321569824">
     </a>
     <a class="indexterm" name="idm46045321568336">
     </a>
     <p>
      The port number that the server should use when listening
            for TCP/IP connections. The port number must be 1024 or
            higher unless the server is started by the
      <code class="literal">
       root
      </code>
      operating system user.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_skip-kill-mysqld">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_skip-kill-mysqld">
       <code class="option">
        --skip-kill-mysqld
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for skip-kill-mysqld">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --skip-kill-mysqld
          </code>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321558272">
     </a>
     <a class="indexterm" name="idm46045321556784">
     </a>
     <p>
      Do not try to kill stray
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      processes
            at startup. This option works only on Linux.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_socket">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_socket">
       <code class="option">
        --socket=
        <em class="replaceable">
         <code>
          path
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for socket">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --socket=file_name
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          File name
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321543488">
     </a>
     <a class="indexterm" name="idm46045321542000">
     </a>
     <p>
      The Unix socket file that the server should use when
            listening for local connections.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_syslog">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog">
       <code class="option">
        --syslog
       </code>
      </a>
      ,
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog">
       <code class="option">
        --skip-syslog
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for syslog">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --syslog
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Deprecated
         </th>
         <td>
          Yes
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321529280">
     </a>
     <a class="indexterm" name="idm46045321527792">
     </a>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for skip-syslog">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --skip-syslog
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Deprecated
         </th>
         <td>
          Yes
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321518816">
     </a>
     <a class="indexterm" name="idm46045321517328">
     </a>
     <p>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog">
       <code class="option">
        --syslog
       </code>
      </a>
      causes error
            messages to be sent to
      <code class="literal">
       syslog
      </code>
      on systems
            that support the
      <span class="command">
       <strong>
        logger
       </strong>
      </span>
      program.
      <code class="literal">
       --skip-syslog
      </code>
      suppresses the use of
      <code class="literal">
       syslog
      </code>
      ; messages are written to an error
            log file.
     </p>
     <p>
      When
      <code class="literal">
       syslog
      </code>
      is used for error logging,
            the
      <code class="literal">
       daemon.err
      </code>
      facility/severity is used
            for all log messages.
     </p>
     <p>
      Using these options to control
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      logging is deprecated. To write error log output to the
            system log, use the instructions at
      <a class="xref" href="error-log-syslog.html" title="7.4.2.8 Error Logging to the System Log">
       Section 7.4.2.8, “Error Logging to the System Log”
      </a>
      . To control the facility,
            use the server
      <a class="ulink" href="/doc/refman/8.0/en/server-system-variables.html#sysvar_log_syslog_facility" target="_top">
       <code class="literal">
        log_syslog_facility
       </code>
      </a>
      system
            variable.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_syslog-tag">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog-tag">
       <code class="option">
        --syslog-tag=
        <em class="replaceable">
         <code>
          tag
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for syslog-tag">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --syslog-tag=tag
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Deprecated
         </th>
         <td>
          Yes
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321495856">
     </a>
     <a class="indexterm" name="idm46045321494368">
     </a>
     <p>
      For logging to
      <code class="literal">
       syslog
      </code>
      , messages from
      <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>
      and
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      are written with identifiers of
      <code class="literal">
       mysqld_safe
      </code>
      and
      <code class="literal">
       mysqld
      </code>
      , respectively. To specify a suffix
            for the identifiers, use
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog-tag">
       <code class="option">
        --syslog-tag=
        <em class="replaceable">
         <code>
          tag
         </code>
        </em>
       </code>
      </a>
      ,
            which modifies the identifiers to be
      <code class="literal">
       mysqld_safe-
       <em class="replaceable">
        <code>
         tag
        </code>
       </em>
      </code>
      and
      <code class="literal">
       mysqld-
       <em class="replaceable">
        <code>
         tag
        </code>
       </em>
      </code>
      .
     </p>
     <p>
      Using this option to control
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      logging is deprecated. Use the server
      <a class="ulink" href="/doc/refman/8.0/en/server-system-variables.html#sysvar_log_syslog_tag" target="_top">
       <code class="literal">
        log_syslog_tag
       </code>
      </a>
      system
            variable instead. See
      <a class="xref" href="error-log-syslog.html" title="7.4.2.8 Error Logging to the System Log">
       Section 7.4.2.8, “Error Logging to the System Log”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_timezone">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_timezone">
       <code class="option">
        --timezone=
        <em class="replaceable">
         <code>
          timezone
         </code>
        </em>
       </code>
      </a>
     </p>
     <div class="informaltable">
      <table frame="box" rules="all" summary="Properties for timezone">
       <colgroup>
        <col style="width: 30%"/>
        <col style="width: 70%"/>
       </colgroup>
       <tbody>
        <tr>
         <th>
          Command-Line Format
         </th>
         <td>
          <code class="literal">
           --timezone=timezone
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321470784">
     </a>
     <a class="indexterm" name="idm46045321469296">
     </a>
     <p>
      Set the
      <code class="literal">
       TZ
      </code>
      time zone environment variable
            to the given option value. Consult your operating system
            documentation for legal time zone specification formats.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="option_mysqld_safe_user">
      </a>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_user">
       <code class="option">
        --user={
        <em class="replaceable">
         <code>
          user_name
         </code>
        </em>
        |
        <em class="replaceable">
         <code>
          user_id
         </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={user_name|user_id}
          </code>
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          String
         </td>
        </tr>
        <tr>
         <th>
          Type
         </th>
         <td>
          Numeric
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <a class="indexterm" name="idm46045321454016">
     </a>
     <a class="indexterm" name="idm46045321452528">
     </a>
     <p>
      Run the
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      server as the user having
            the name
      <em class="replaceable">
       <code>
        user_name
       </code>
      </em>
      or the numeric
            user ID
      <em class="replaceable">
       <code>
        user_id
       </code>
      </em>
      .
            (
      <span class="quote">
       “
       <span class="quote">
        User
       </span>
       ”
      </span>
      in this context refers to a system
            login account, not a MySQL user listed in the grant tables.)
     </p>
    </li>
   </ul>
  </div>
  <p>
   If you execute
   <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>
   with the
   <a class="link" href="mysqld-safe.html#option_mysqld_safe_defaults-file">
    <code class="option">
     --defaults-file
    </code>
   </a>
   or
   <a class="link" href="mysqld-safe.html#option_mysqld_safe_defaults-extra-file">
    <code class="option">
     --defaults-extra-file
    </code>
   </a>
   option
        to name an option file, the option must be the first one given
        on the command line or the option file is not used. For example,
        this command does not use the named option file:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa55031449"><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">mysql&gt;</span><span class="token command"> mysqld_safe</span> <span class="token constant">--port</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">port_num</em></span> <span class="token constant">--defaults-file</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">file_name</em></span></code></pre>
  </div>
  <p>
   Instead, use the following command:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa58537709"><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">mysql&gt;</span><span class="token command"> mysqld_safe</span> <span class="token constant">--defaults-file</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">file_name</em></span> <span class="token constant">--port</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">port_num</em></span></code></pre>
  </div>
  <p>
   The
   <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>
   script is written so that it
        normally can start a server that was installed from either a
        source or a binary distribution of MySQL, even though these
        types of distributions typically install the server in slightly
        different locations. (See
   <a class="xref" href="installation-layouts.html" title="2.1.5 Installation Layouts">
    Section 2.1.5, “Installation Layouts”
   </a>
   .)
   <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>
   expects one of the following
        conditions to be true:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      The server and databases can be found relative to the
            working directory (the directory from which
      <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>
      is invoked). For binary
            distributions,
      <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>
      looks under
            its working directory for
      <code class="filename">
       bin
      </code>
      and
      <code class="filename">
       data
      </code>
      directories. For source
            distributions, it looks for
      <code class="filename">
       libexec
      </code>
      and
      <code class="filename">
       var
      </code>
      directories. This condition should
            be met if you execute
      <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>
      from
            your MySQL installation directory (for example,
      <code class="filename">
       /usr/local/mysql
      </code>
      for a binary
            distribution).
     </p>
    </li>
    <li class="listitem">
     <p>
      If the server and databases cannot be found relative to the
            working directory,
      <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>
      attempts
            to locate them by absolute path names. Typical locations are
      <code class="filename">
       /usr/local/libexec
      </code>
      and
      <code class="filename">
       /usr/local/var
      </code>
      . The actual locations
            are determined from the values configured into the
            distribution at the time it was built. They should be
            correct if MySQL is installed in the location specified at
            configuration time.
     </p>
    </li>
   </ul>
  </div>
  <p>
   Because
   <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>
   tries to find the server
        and databases relative to its own working directory, you can
        install a binary distribution of MySQL anywhere, as long as you
        run
   <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>
   from the MySQL installation
        directory:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa78890608"><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">cd <em class="replaceable">mysql_installation_directory</em>
bin/mysqld_safe &amp;</code></pre>
  </div>
  <p>
   If
   <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>
   fails, even when invoked from
        the MySQL installation directory, specify the
   <a class="link" href="mysqld-safe.html#option_mysqld_safe_ledir">
    <code class="option">
     --ledir
    </code>
   </a>
   and
   <a class="link" href="mysqld-safe.html#option_mysqld_safe_datadir">
    <code class="option">
     --datadir
    </code>
   </a>
   options to
        indicate the directories in which the server and databases are
        located on your system.
  </p>
  <p>
   <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>
   tries to use the
   <span class="command">
    <strong>
     sleep
    </strong>
   </span>
   and
   <span class="command">
    <strong>
     date
    </strong>
   </span>
   system
        utilities to determine how many times per second it has
        attempted to start. If these utilities are present and the
        attempted starts per second is greater than 5,
   <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>
   waits 1 full second before
        starting again. This is intended to prevent excessive CPU usage
        in the event of repeated failures. (Bug #11761530, Bug #54035)
  </p>
  <p>
   When 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
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   ,
   <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>
   arranges for error (and notice) messages from itself and from
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   to go to the same destination.
  </p>
  <p>
   There are several
   <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>
   options for
        controlling the destination of these messages:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_log-error">
       <code class="option">
        --log-error=
        <em class="replaceable">
         <code>
          file_name
         </code>
        </em>
       </code>
      </a>
      :
            Write error messages to the named error file.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog">
       <code class="option">
        --syslog
       </code>
      </a>
      : Write error
            messages to
      <code class="literal">
       syslog
      </code>
      on systems that
            support the
      <span class="command">
       <strong>
        logger
       </strong>
      </span>
      program.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog">
       <code class="option">
        --skip-syslog
       </code>
      </a>
      :
            Do not write error messages to
      <code class="literal">
       syslog
      </code>
      .
            Messages are written to the default error log file
            (
      <code class="filename">
       <em class="replaceable">
        <code>
         host_name
        </code>
       </em>
       .err
      </code>
      in the data directory), or to a named file if the
      <a class="link" href="mysqld-safe.html#option_mysqld_safe_log-error">
       <code class="option">
        --log-error
       </code>
      </a>
      option is
            given.
     </p>
    </li>
   </ul>
  </div>
  <p>
   If none of these options is given, the default is
   <a class="link" href="mysqld-safe.html#option_mysqld_safe_syslog">
    <code class="option">
     --skip-syslog
    </code>
   </a>
   .
  </p>
  <p>
   When
   <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>
   writes a message, notices go
        to the logging destination (
   <code class="literal">
    syslog
   </code>
   or the
        error log file) and
   <code class="literal">
    stdout
   </code>
   . Errors go to the
        logging destination and
   <code class="literal">
    stderr
   </code>
   .
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    Controlling
    <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
     <span class="command">
      <strong>
       mysqld
      </strong>
     </span>
    </a>
    logging from
    <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>
    is deprecated. Use the server's
          native
    <code class="literal">
     syslog
    </code>
    support instead. For more
          information, see
    <a class="xref" href="error-log-syslog.html" title="7.4.2.8 Error Logging to the System Log">
     Section 7.4.2.8, “Error Logging to the System Log”
    </a>
    .
   </p>
  </div>
 </div>
 <br/>
</div>
