Stop Using the MySQL Extension!
Results 1 to 1 of 1

Thread: Stop Using the MySQL Extension!

  1. #1
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    General Systems Vehicle "Thrilled To Be Here"

    Stop Using the MySQL Extension!

    Development of PHP's MySQL extension (which provides all the mysql_* functions) ceased several years ago, and does not take advantage of any features added to MySQL since MySQL 4.1.

    PHP's developers recommend that this extension no longer be used for new development. It is now deprecated as of PHP 5.5, and it will eventually be removed from PHP.

    This does not mean that MySQL support is being removed. That would be silly.

    Years ago, all development of PHP's MySQL interface was shifted the MySQLi and PDO::MySQL APIs, and all new development should use one of these; existing applications using the MySQL interface should be migrated as soon as it's feasible.

    Development of the MySQL extension ended at the same time, and has since only had maintenance work done on it to keep it functioning while the rest of PHP changed around it. And this is getting really boring. PHP's developers have better things to do than keeping an outdated extension ticking over, just as Microsoft has better things to do than supply updates for Windows 95.

    All manual pages for functions in the old API (mysql_connect, mysql_query, etc.) have warnings about this, and include references to suitable replacements.

    It is recommended to use either the mysqli or PDO_MySQL extensions. It is not recommended to use the old mysql extension for new development.

    This extension is not recommended for writing new code. Instead, either the mysqli or PDO_MySQL extension should be used.

    Someone at Oracle (the owners of MySQL) has written a migration note (, which includes a converter intended to ease the process. (Fair warning: I personally haven't used it, so I don't know how effective it is. It was published in December 2011.)
    Last edited by Weedpacket; 01-12-2013 at 02:31 AM.
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts