MySQL

:: DEVELOPER ZONE

Login / Register

  • MySQL.com
  • MySQL Network
  • Developer Zone
  • Partners
  • Online Shop
  • Downloads
  • Documentation
  • Forums
  • Lists
  • Bugs
  • Events
  • User Groups
  • Guilds
  • Blogs
  • Support
  • Resources
  • Books
  • FAQ

Download Connector/PHP

  • Overview
  • Database Server
  • Cluster
  • MaxDB
  • Migration Toolkit
  • Administrator
  • Query Browser
  • Connectors
  • Other Software
  • Mirror Sites

PHP -- Windows downloads for connecting to MYSQL from PHP

  • mysqli extension (PHP 5.1.2)
    • for MySQL Server 5.0.18   (~700k)   md5: 94b6045807cfd235be1b8df7b970c89d
    • for MySQL Server 4.1.16   (~700k)   md5: 7b1a6f8bcd5b202a14fb2afd44c691ad
  • mysql extension (PHP 5.1.2)
    • for MySQL Server 5.0.18   (~700k)   md5: cee7674de439249214bfc1699598f1b0
    • for MySQL Server 4.1.16   (~700k)   md5: 898b2ce4c402f6cd2c62bf6c4910672b
  • MySQL PDO driver (PHP 5.1.2)
    • for MySQL Server 5.0.18   (~700k)   md5: 98c90598a34cec62584ab009b5b42cd1
    • for MySQL Server 4.1.16   (~700k)   md5: 60cd9c2910730a67bbc9d3942d2672a7

We suggest that you use the MD5 checksums and GnuPG signatures to verify the integrity of the packages you download.

If you have questions on PHP and MySQL that the Download FAQ does not answer, please use the MySQL PHP forum to discuss them.

Changelog
  • 16/01/2006 - Update to security release, PHP 5.1.2, fixes low risk Format String Vulnerability affecting only the ext/mysqli users. ext/mysql users are not required to upgrade to the new release
  • 10/01/2006 - Initial release
Download FAQ
Is this for Microsoft Windows only?

Yes, we provide the binaries only for Microsoft Windows. The zip packages contain the mysql/mysqli extensions and the MySQL PDO driver for PHP 5.1 with support for the MySQL Server versions 4.1.16+ and 5.0.18+.

We do not provide binary downloads for any other operating systems. On Unix and Mac OS X you can compile PHP and the PHP extensions yourself. This is described well in the PHP Manual for Unix and its variants and Mac OS X Server or Client.

Why should I download the PHP mysql/mysqli extensions from mysql.com and not from php.net?

The binary distribution of mysql.com is based on the latest MySQL Client libraries. Only the libraries used for the mysql.com distributions contain the latest bug fixes and can use all the features of the MySQL Server versions 4.1.16+ and 5.0.18+.

The PHP 5.1 distribution that is available on php.net is linked against an old version of the MySQL Client API library. The mysql and mysql extensions from php.net are based on the MySQL Client API version 4.1.7. The MySQL Client API versions used for the mysql.com downloads are 4.1.16 and 5.0.18.

We recommend to use the MySQL Client API version that matches the MySQL Server version. For the MySQL Server 5.0.18 you should use the MySQL Client API 5.0.18 (mysql.com download) but not 4.1.7 (php.net download). For example, mysqli_stmt_bind_param() will fail when you try to access a DECIMAL column on a MySQL 5.0.18 server if you use old versions of the MySQL Client API, like the php.net downloads do.

Are there any differences between the mysql.com and php.net versions?

Yes, there is one difference. The mysql.com download is based on the latest MySQL Client libraries.

No other differences exist. Both downloads contain the same PHP functions. We use the official PHP source code that is available on php.net to build the binaries.

How do I install the mysql/mysqli extensions for PHP?

Installing the extensions is easy. You have to verify two settings in your php.ini configuration file and copy the extensions to the php extension directory.

Step by step:

  • Unpack the download archive
  • Copy the php_*.dll files to your PHP extension directory
  • You can look up and confiugure the PHP extension directory in your php.ini file. A typical location for the php.ini file is C:\php\php.ini. The PHP extension directory is configured using the extension_dir setting, for example:

    extension_dir = C:\php\extensions

    Copy the php_*.dll files contained in the download to your PHP extension directory, for example to: C:\php\extensions

  • Enable the PHP extensions that you want to use in the php.ini file
  • Uncomment or add the following lines to your php.ini file:

    // MySQL extension
    extension=php_mysql.dll
    // MySQLi extension
    extension=php_mysqli.dll
    // MySQL PDO driver
    extension=php_pdo_mysql.dll
  • Copy the libmysql.dll to the PHP installation directory
  • A typical location for your PHP installation directory is C:\php . Exchange the libmysql.dll file that is in the directory and overwrite it with the file from the download archive.

If you have further questions on the installation, please read the chapter "Installation of extensions on Windows" of the PHP manual.

You may also ask for help in the MySQL PHP Forum.

When do I have to download and install a new version?

We plan to update the downloads whenever a new Generally Available (GA) Release of the MySQL Server or a new production version of PHP 5.1 is released. In general, we recommend downloading new versions whenever we make a release, as each version may contain possible security fixes.

Why is there no download for older versions of PHP?

We kindly request you to use the latest production version of PHP 5.1 and the mysqli extension. The latest version of PHP has seen many improvements and security fixes over 5.0.

What is the difference between the mysql and mysqli extensions for PHP?

The mysql extension does not support the full functionality of MySQL versions greater than 4.1.0, such as Stored Procedures, Triggers, Views, Precision Math and much more. In order to use all functions of the latest MySQL Server Releases you have to use the mysqli extension that is available as of PHP 5.0.

The main features of the mysqli extension are:

  • access to all MySQL 4.1/5.0 features
  • a procedural interface that is similar to the mysql extensions
  • an object-oriented interface that is easier to extend than the procedural interface

See also MySQL 5.0 Reference Manual :: MySQL PHP API

Which MySQL version should I use when I start with PHP and MySQL?

Please use MySQL 5.0. MySQL 5.0 is the most advanced Generally Available (GA) Release of the MySQL Server. 5.0 contains for support for Stored Procedures, Triggers, Views, Precision Math and much more, see MySQL 5.0 Reference Manual :: What's New in MySQL 5.0

We do not encourage you to start with MySQL 4.1 or older any longer.

Can I query any server older than 4.1.16+/5.0.18+ with the binaries provided?

You might be able to do that, but we do not recommend it. You should use the mysql and mysqli extensions that we offer for download only to access the MySQL Server 4.1.16+ and 5.0.18+.

“MySQL Cluster delivers the high-availability that enables us to guarantee continuous broadband internet access and VoIP services to our subscribers.” —Lars-Åke Norling, CTO, Bredbandsbolaget (B2), Sweden's Largest Broadband Provider

Learn more about MySQL Cluster....


Learn about new MySQL releases, technical articles, events and more.

Subscribe to the monthly MySQL Newsletter!


© 1995-2006 MySQL AB. All rights reserved.

  • About MySQL
  • Careers
  • Site Map
  • Contact Us
  • Privacy Policy
  • Legal
  • No Software Patents!