PHP supports three different extensions for connecting to MySQL databases:

  • MySQL – the original, and now outdated, MySQL API
  • MySQLi (MySQL Improved) – an improved MySQL interface, and the recommend method to use
  • PDO MySQL – an alternative database abstraction method

MySQL is deprecated as of PHP 5.5, and has been removed entirely from PHP 7.0.  If you are using PHP 7.0 and your application only supports MySQL, it will not be able to connect to any MySQL databases.  Your application should be using MySQLi or PDO MySQL instead.


Many PHP applications are configurable to use either MySQL or MySQLi.  You should check the application’s documentation or settings to see if you can specify MySQLi.  If your application only supports MySQL, then you will need to change your PHP version to use a lower version, like 5.4 (5.5 and 5.6 will probably generate warning messages because MySQL is deprecated).


For more information about the different PHP MySQL extensions, please refer to the PHP documentation here: