2010-03-28 22:10:10 +00:00
<?xml version="1.0" encoding="utf-8"?>
2009-07-11 08:13:42 +00:00
<!-- $Revision$ -->
2007-06-20 22:25:43 +00:00
<section xml:id= "mysql.installation" xmlns= "http://docbook.org/ns/docbook" xmlns:xlink= "http://www.w3.org/1999/xlink" >
2002-11-25 23:49:22 +00:00
&reftitle.install;
2004-09-11 09:40:06 +00:00
2007-06-20 22:25:43 +00:00
<para xml:id= "mysql.configure" >
2005-04-11 20:20:45 +00:00
For compiling, simply use the
<option role= "configure" > --with-mysql[=DIR]</option>
configuration option where the optional <literal > [DIR]</literal> points to
the MySQL installation directory.
2002-11-25 23:49:22 +00:00
</para>
2006-03-11 15:46:12 +00:00
<para >
Although this MySQL extension is compatible with MySQL 4.1.0 and greater,
it doesn't support the extra functionality that these versions provide.
For that, use the <link linkend= "ref.mysqli" > MySQLi</link> extension.
2003-06-08 15:07:08 +00:00
</para>
2004-03-13 15:54:04 +00:00
<para >
If you would like to install the mysql extension along with the mysqli extension
you have to use the same client library to avoid any conflicts.
</para>
2005-04-11 20:20:45 +00:00
2007-06-20 22:25:43 +00:00
<section xml:id= "mysql.installation.linux" >
2005-04-11 20:20:45 +00:00
<title > Installation on Linux Systems</title>
2011-10-21 01:37:42 +00:00
<para >
Note: <literal > [DIR]</literal> is the path to the MySQL client library
files (<emphasis > headers and libraries</emphasis> ), which can be downloaded from
<link xlink:href= "&url.mysql;" > MySQL</link> .
</para>
<table >
<title > MySQL compile time support matrix</title>
<tgroup cols= "5" >
<thead >
<row >
<entry > PHP Version</entry>
<entry > Default</entry>
<entry > Flag: <link linkend= "mysqlnd.overview" > mysqlnd</link> </entry>
<entry > Flag: <literal > libmysql</literal> </entry>
<entry > Changelog and notes</entry>
</row>
</thead>
<tbody >
<row >
<entry > 4.x.x</entry>
<entry > libmysql</entry>
<entry > &NotAvailable; </entry>
<entry > <option role= "configure" > --without-mysql</option> to disable</entry>
<entry > MySQL enabled by default, MySQL client libraries are bundled</entry>
</row>
<row >
<entry > 5.0.x, 5.1.x, 5.2.x</entry>
<entry > libmysql</entry>
<entry > &NotAvailable; </entry>
<entry > <option role= "configure" > --with-mysql=[DIR]</option> </entry>
<entry > MySQL is no longer enabled by default, and the MySQL client libraries are <link linkend= "faq.databases.mysql.php5" > no longer bundled</link> </entry>
</row>
<row >
<entry > 5.3.x</entry>
<entry > libmysql</entry>
<entry > <option role= "configure" > --with-mysql=mysqlnd</option> </entry>
<entry > <option role= "configure" > --with-mysql=[DIR]</option> </entry>
<entry > mysqlnd is now available</entry>
</row>
<row >
<entry > 5.4.x</entry>
<entry > mysqlnd</entry>
<entry > <option role= "configure" > --with-mysql</option> </entry>
<entry > <option role= "configure" > --with-mysql=[DIR]</option> </entry>
<entry > mysqlnd is now the default</entry>
</row>
</tbody>
</tgroup>
</table>
2005-04-11 20:20:45 +00:00
</section>
2007-06-20 22:25:43 +00:00
<section xml:id= "mysql.installation.windows" >
2005-04-11 20:20:45 +00:00
<title > Installation on Windows Systems</title>
<section >
<title > PHP 4</title>
<para >
The PHP MySQL extension is compiled into PHP.
</para>
</section>
<section >
2010-08-18 18:13:02 +00:00
<title > PHP 5.0.x, 5.1.x, 5.2.x</title>
2005-04-11 20:20:45 +00:00
<para >
MySQL is no longer enabled by default, so the
<filename > php_mysql.dll</filename> DLL must be enabled inside of
&php.ini; . Also, PHP needs access to the MySQL client library. A file
named <filename > libmysql.dll</filename> is included in the Windows PHP
distribution and in order for PHP to talk to MySQL this file needs to be
available to the Windows systems <envar > PATH</envar> . See the FAQ
titled "<link linkend= "faq.installation.addtopath" > How do I add my PHP
2009-04-19 20:40:13 +00:00
directory to the <varname > PATH</varname> on Windows</link> " for information on how to do
2005-04-11 20:20:45 +00:00
this. Although copying <filename > libmysql.dll</filename> to the Windows
system directory also works (because the system directory is by default in
2005-08-13 09:55:00 +00:00
the system's <envar > PATH</envar> ), it's not recommended.
2005-04-11 20:20:45 +00:00
</para>
<para >
As with enabling any PHP extension (such as
<filename > php_mysql.dll</filename> ), the PHP directive
<link linkend= "ini.extension-dir" > extension_dir</link> should be set to
the directory where the PHP extensions are located. See also the
<link linkend= "install.windows.manual" > Manual Windows Installation
Instructions</link> . An example extension_dir value for PHP 5 is
<literal > c:\php\ext</literal>
</para>
<note >
<para >
If when starting the web server an error similar to the following occurs:
<literal > "Unable to load dynamic library './php_mysql.dll'"</literal> ,
this is because <filename > php_mysql.dll</filename> and/or
<filename > libmysql.dll</filename> cannot be found by the system.
</para>
</note>
</section>
2010-08-18 18:13:02 +00:00
<section >
2011-10-21 01:37:42 +00:00
<title > PHP 5.3.0+</title>
<para >
The <link linkend= "mysqlnd.overview" > MySQL Native Driver</link> is enabled by
default. Include <filename > php_mysql.dll</filename> , but <filename > libmysql.dll</filename>
is no longer required or used.
</para>
2010-08-18 18:13:02 +00:00
</section>
2005-04-11 20:20:45 +00:00
</section>
2007-06-20 22:25:43 +00:00
<section xml:id= "mysql.installation.notes" >
2005-04-11 20:20:45 +00:00
<title > MySQL Installation Notes</title>
<warning >
<para >
Crashes and startup problems of PHP may be encountered
when loading this extension in conjunction with the recode extension.
See the <link linkend= "ref.recode" > recode</link> extension for more
information.
</para>
</warning>
<note >
<para >
If you need charsets other than <emphasis > latin</emphasis> (default), you
have to install external (not bundled) libmysql with compiled charset
support.
</para>
</note>
</section>
2002-11-25 23:49:22 +00:00
</section>
<!-- 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
2009-09-25 07:04:39 +00:00
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
2002-11-25 23:49:22 +00:00
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
-->