Files
archived-doc-pt-br/reference/mysqlnd/install.xml
2026-01-19 03:26:47 +00:00

118 lines
3.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 9598935f21bc472f22383fb989625f0b22785331 Maintainer: leonardolara Status: ready -->
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="mysqlnd.install">
<title>Instalação</title>
<simpara>
<emphasis role="bold">Instalação em Unix</emphasis>
</simpara>
<simpara>
Para usar o Driver Nativo MySQL, o PHP precisa
ser construído especificando que as extensões do banco de dados MySQL são
compiladas com suporte ao MySQL Native Driver. Isso é feito através
de opções de configuração antes de compilar o código-fonte do PHP.
</simpara>
<simpara>
Por exemplo, para construir a extensão MySQL, <literal>mysqli</literal>
e PDO MYSQL utilizando o Driver Nativo MySQL, seria dado
o seguinte comando:
</simpara>
<programlisting role="shell">
<![CDATA[
./configure --with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
[other options]
]]>
</programlisting>
<simpara>
<emphasis role="bold">Instalação no Windows</emphasis>
</simpara>
<simpara>
Nas distribuições oficiais do PHP para Windows, o Driver Nativo
MySQL está habilitado por padrão, portanto, nenhuma configuração adicional é
necessária para usá-lo. Todas as extensões de banco de dados MySQL usarão o Driver
Nativo MySQL neste caso.
</simpara>
<simpara>
<emphasis role="bold">Suporte ao plug-in de autenticação SHA-256</emphasis>
</simpara>
<simpara>
O Driver Nativo MySQL requer que a funcionalidade OpenSSL do PHP esteja carregada
e habilitada para conexão ao MySQL através de contas que utilizam o Plugin de Autenticação
MySQL SHA-256. Por exemplo, o PHP pode ser configurado usando:
</simpara>
<programlisting role="shell">
<![CDATA[
./configure --with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-openssl
[other options]
]]>
</programlisting>
<simpara>
No Autotools, o suporte SSL estendido no <literal>mysqlnd</literal> é
habilitado implicitamente ao construir junto com a extensão <literal>openssl</literal>
usando a opção de configuração <option role="configure">--with-openssl</option>.
Ao compilar sem a extensão <literal>openssl</literal>, a opção de configuração
<option role="configure">--with-mysqlnd-ssl</option> pode ser
usada para ativar explicitamente o suporte SSL estendido.
</simpara>
<simplesect role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
A opção de configuração <option role="configure">--with-mysqlnd-ssl</option>
do Autotools foi adicionada para ativar explicitamente o suporte SSL estendido
ao compilar sem a extensão <literal>openssl</literal>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</simplesect>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->