<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="windows-server-first-start">
      </a>
      2.3.3.5 Starting the Server for the First Time
     </h4>
    </div>
   </div>
  </div>
  <p>
   This section gives a general overview of starting the MySQL
        server. The following sections provide more specific information
        for starting the MySQL server from the command line or as a
        Windows service.
  </p>
  <p>
   The information here applies primarily if you installed MySQL
        using the
   <code class="literal">
    noinstall
   </code>
   version, or if you wish
        to configure and test MySQL manually rather than using
        MySQL Configurator.
  </p>
  <p>
   The examples in these sections assume that MySQL is installed
        under the default location of
   <code class="filename">
    C:\Program
        Files\MySQL\MySQL Server 8.4
   </code>
   . Adjust the
        path names shown in the examples if you have MySQL installed in
        a different location.
  </p>
  <p>
   Clients have two options. They can use TCP/IP, or they can use a
        named pipe if the server supports named-pipe connections.
  </p>
  <p>
   MySQL for Windows also supports shared-memory connections if the
        server is started with the
   <a class="link" href="server-system-variables.html#sysvar_shared_memory">
    <code class="literal">
     shared_memory
    </code>
   </a>
   system variable
        enabled. Clients can connect through shared memory by using the
   <a class="link" href="connection-options.html#option_general_protocol">
    <code class="option">
     --protocol=MEMORY
    </code>
   </a>
   option.
  </p>
  <p>
   For information about which server binary to run, see
   <a class="xref" href="windows-select-server.html" title="2.3.3.3 Selecting a MySQL Server Type">
    Section 2.3.3.3, “Selecting a MySQL Server Type”
   </a>
   .
  </p>
  <p>
   Testing is best done from a command prompt in a console window
        (or
   <span class="quote">
    “
    <span class="quote">
     DOS window
    </span>
    ”
   </span>
   ). In this way you can have the
        server display status messages in the window where they are easy
        to see. If something is wrong with your configuration, these
        messages make it easier for you to identify and fix any
        problems.
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    The database must be initialized before MySQL can be started.
          For additional information about the initialization process,
          see
    <a class="xref" href="data-directory-initialization.html" title="2.9.1 Initializing the Data Directory">
     Section 2.9.1, “Initializing the Data Directory”
    </a>
    .
   </p>
  </div>
  <p>
   To start the server, enter this command:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa25924138"><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">C:\&gt;</span> <span class="token atrule">"C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld"</span> <span class="token property">--console</span></code></pre>
  </div>
  <p>
   You should see messages similar to those following as it starts
        (the path names and sizes may differ). The
   <code class="literal">
    ready for
        connections
   </code>
   messages indicate that the server is ready
        to service client connections.
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-none"><div class="docs-select-all right" id="sa94118152"><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-none">[Server] C:\mysql\bin\mysqld.exe (mysqld 8.0.30) starting as process 21236
[InnoDB] InnoDB initialization has started.
[InnoDB] InnoDB initialization has ended.
[Server] CA certificate ca.pem is self signed.
[Server] Channel mysql_main configured to support TLS. 
Encrypted connections are now supported for this channel.
[Server] X Plugin ready for connections. Bind-address: '::' port: 33060
[Server] C:\mysql\bin\mysqld.exe: ready for connections. 
Version: '8.0.30'  socket: ''  port: 3306  MySQL Community Server - GPL.</code></pre>
  </div>
  <p>
   You can now open a new console window in which to run client
        programs.
  </p>
  <p>
   If you omit the
   <a class="link" href="server-options.html#option_mysqld_console">
    <code class="option">
     --console
    </code>
   </a>
   option,
        the server writes diagnostic output to the error log in the data
        directory (
   <code class="filename">
    C:\Program Files\MySQL\MySQL Server
        8.4\data
   </code>
   by default). The error log is
        the file with the
   <code class="filename">
    .err
   </code>
   extension, and may
        be set using the
   <a class="link" href="server-options.html#option_mysqld_log-error">
    <code class="option">
     --log-error
    </code>
   </a>
   option.
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    The initial
    <code class="literal">
     root
    </code>
    account in the MySQL grant
          tables has no password. After starting the server, you should
          set up a password for it using the instructions in
    <a class="xref" href="default-privileges.html" title="2.9.4 Securing the Initial MySQL Account">
     Section 2.9.4, “Securing the Initial MySQL Account”
    </a>
    .
   </p>
  </div>
 </div>
 <br/>
</div>
