<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.mysqlnd.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'mysqlnd.install.php',
    1 => 'Installation',
    2 => 'Installation',
  ),
  'up' => 
  array (
    0 => 'book.mysqlnd.php',
    1 => 'Mysqlnd',
  ),
  'prev' => 
  array (
    0 => 'mysqlnd.overview.php',
    1 => 'Overview',
  ),
  'next' => 
  array (
    0 => 'mysqlnd.config.php',
    1 => 'Runtime Configuration',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mysqlnd/install.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mysqlnd.install" class="chapter">

  <h1 class="title">Installation</h1>


  <p class="simpara">
    <strong>Installation on Unix</strong>
  </p>

  <p class="simpara">
    In order to use the MySQL Native Driver, PHP needs
    to be built specifying that the MySQL database extensions are
    compiled with MySQL Native Driver support. This is done through
    configuration options prior to building the PHP source code.
  </p>

  <p class="simpara">
    For example, to build the MySQL extension, <code class="literal">mysqli</code>
    and PDO MYSQL using the MySQL Native Driver, the following command
    would be given:
  </p>

<div class="example-contents">
<div class="shellcode"><pre class="shellcode">./configure --with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
[other options]</pre>
</div>
</div>


  <p class="simpara">
    <strong>Installation on Windows</strong>
  </p>

  <p class="simpara">
    In the official PHP Windows distributions, MySQL Native
    Driver is enabled by default, so no additional configuration is
    required to use it. All MySQL database extensions will use MySQL
    Native Driver in this case.
  </p>

  <p class="simpara">
    <strong>SHA-256 Authentication Plugin support</strong>
  </p>

  <p class="simpara">
    The MySQL Native Driver requires the OpenSSL functionality of PHP to be loaded
    and enabled to connect to MySQL through accounts that use the MySQL SHA-256
    Authentication Plugin. For example, PHP could be configured using:
  </p>

<div class="example-contents">
<div class="shellcode"><pre class="shellcode">./configure --with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-openssl
[other options]</pre>
</div>
</div>


 <p class="simpara">
  In Autotools, the extended SSL support in <code class="literal">mysqlnd</code> is
  enabled implicitly when building together with the <code class="literal">openssl</code>
  extension using the <strong class="option configure">--with-openssl</strong> configure
  option. When building without the <code class="literal">openssl</code> extension, the
  <strong class="option configure">--with-mysqlnd-ssl</strong> configure option can be
  used to enable extended SSL support explicitly.
 </p>

 <div class="simplesect">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       The <strong class="option configure">--with-mysqlnd-ssl</strong> Autotools
       configure option was added to enable the extended SSL support explicitly
       when building without the <code class="literal">openssl</code> extension.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

</div>
<?php manual_footer($setup); ?>