<?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 => 'ja',
  ),
  'this' => 
  array (
    0 => 'mysqlnd.install.php',
    1 => 'インストール',
    2 => 'インストール',
  ),
  'up' => 
  array (
    0 => 'book.mysqlnd.php',
    1 => 'Mysqlnd',
  ),
  'prev' => 
  array (
    0 => 'mysqlnd.overview.php',
    1 => '概要',
  ),
  'next' => 
  array (
    0 => 'mysqlnd.config.php',
    1 => '実行時設定',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    '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">インストール</h1>


  <p class="simpara">
    <strong>Unix へのインストール</strong>
  </p>

  <p class="simpara">
    MySQL Native Driver を使うには、MySQL データベース拡張モジュールを MySQL Native Driver のサポート付でコンパイルすることを指定して PHP をビルドする必要があります。
    これは、PHP のソースコードをビルドする前に、設定オプションを通じて行なわれます。
  </p>

  <p class="simpara">
    例えば MySQL Native Driver を用いて、
    MySQL 拡張モジュール <code class="literal">mysqli</code> と、
    PDO MYSQL をビルドするには、以下のコマンドを使います。
  </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>Windows へのインストール</strong>
  </p>

  <p class="simpara">
    公式な Windows 版の PHP では、
    MySQL Native Driver がデフォルトで使用可能です。
    そのため、使用するための追加の構成は不要です。
    この場合は MySQLデータベース拡張モジュールは全て MySQL Native Driver を使用します。
  </p>

  <p class="simpara">
    <strong>SHA-256 認証プラグインのサポート</strong>
  </p>

  <p class="simpara">
    MySQL Native Driver で MySQL SHA-256 認証プラグインを使ったアカウントによる
    MySQL への接続をするには、PHP の OpenSSL 機能を組み込んで有効にしておく必要があります。
    たとえば、PHP を次のような設定でビルドします。
  </p>

<div class="example-contents">
<div class="shellcode"><pre class="shellcode">./configure --with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-openssl
[その他のオプション]</pre>
</div>
</div>


<p class="simpara">
 Autotoolsでは、 <strong class="option configure">--with-openssl</strong> オプションを使用して
 <code class="literal">openssl</code> 拡張機能とともにビルドする場合、 <code class="literal">mysqlnd</code> の拡張SSLサポートは自動的に有効になります。
 <code class="literal">openssl</code> 拡張機能なしでビルドする場合は、<strong class="option configure">--with-mysqlnd-ssl</strong>
 Autotools オプションを使用することで、明示的に拡張SSLサポートを有効化できます。
</p>

<div class="simplesect">
 <h3 class="title">変更履歴</h3>
 <table class="doctable informaltable">
  
   <thead>
    <tr>
     <th>バージョン</th>
     <th>説明</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr>
     <td>8.4.0</td>
     <td>
      <code class="literal">openssl</code> 拡張機能なしでビルドする場合に、拡張SSLサポートを明示的に有効にできるよう、
      <strong class="option configure">--with-mysqlnd-ssl</strong> Autotools 設定オプションが、追加されました。
     </td>
    </tr>

   </tbody>
  
 </table>

</div>

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