<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Installation</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mysqlnd.overview.html">Overview</a></div> <div class="next" style="text-align: right; float: right;"><a href="mysqlnd.config.html">Runtime Configuration</a></div> <div class="up"><a href="book.mysqlnd.html">Mysqlnd</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="mysqlnd.install" class="chapter"> <h1>Installation</h1> <p class="para"> <em class="emphasis">Changelog</em> </p> <table class="doctable table"> <caption><strong>Changelog</strong></caption> <thead> <tr> <th>Version</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>5.3.0</td> <td> The MySQL Native Driver was added, with support for all MySQL extensions (i.e., mysql, mysqli and PDO_MYSQL). Passing in <em>mysqlnd</em> to the appropriate configure switch enables this support. </td> </tr> <tr> <td>5.4.0</td> <td> The MySQL Native Driver is now the default for all MySQL extensions (i.e., mysql, mysqli and PDO_MYSQL). Passing in <em>mysqlnd</em> to configure is now optional. </td> </tr> <tr> <td>5.5.0</td> <td> SHA-256 Authentication Plugin support was added </td> </tr> </tbody> </table> <p class="para"> <em class="emphasis">Installation on Unix</em> </p> <p class="para"> The MySQL database extensions must be configured to use the MySQL Client Library. 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="para"> For example, to build the MySQL extension, <em>mysqli</em> 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="para"> <em class="emphasis">Installation on Windows</em> </p> <p class="para"> In the official PHP Windows distributions from 5.3 onwards, 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="para"> <em class="emphasis">SHA-256 Authentication Plugin support</em> </p> <p class="para"> 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> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mysqlnd.overview.html">Overview</a></div> <div class="next" style="text-align: right; float: right;"><a href="mysqlnd.config.html">Runtime Configuration</a></div> <div class="up"><a href="book.mysqlnd.html">Mysqlnd</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>