phpMyAdmin - The MySQL Extension is Missing
When you encounter a stack trace in your browser stating that the "MySQL extension is missing," it is almost never about PHP's native mysqli or pdo_mysql drivers. Those are loaded by default in modern PHP distributions and rarely cause a hard failure upon startup unless explicitly disabled. The error message is actually referring to the legacy mysql_* API, which was deprecated in PHP 5.5 and removed entirely in PHP 7.0.
phpMyAdmin historically required this extension for specific internal features, notably for checking the status of certain system tables or executing older utility functions. However, relying on a removed extension is a red flag. If you are running PHP 7 or newer (which is standard practice today), the presence of the mysql extension should be impossible unless you have compiled PHP with legacy support enabled or installed a custom package that backports it.
The most immediate action is to verify your PHP version and disable any references to the mysql API in your configuration. Open your php.ini file and ensure the line extension=mysql is commented out or removed entirely. Modern phpMyAdmin versions have largely migrated away from dependencies on this specific extension because it provides no security benefit over its successor, mysqli. If you are using a very recent release of phpMyAdmin (version 5.x or later), the application should function without it at all. The error suggests you might be running an older version of phpMyAdmin that hasn't been updated to drop its dependency on the deprecated API.
While resolving the core extension issue, you will likely encounter warnings regarding missing compression libraries. These appear as alerts in the setup wizard or the main interface regarding Bzip2 and Zip support. The message Bzip2 compression and decompression requires functions (bzopen, bzcompress) which are unavailable on this system indicates that the PHP build lacks the bzip2 extension. This is not a fatal error for basic database management but prevents you from importing SQL dumps compressed with .sql.bz2 files or exporting tables in that format.
Similarly, the warning about Zip decompression (zip_open) means your server cannot process .sql.zip files. While these formats are less common than plain text or gzipped archives, they offer advantages for transferring large datasets over bandwidth-constrained connections without overwhelming the client browser with a massive single download.
To resolve the Bzip2 and Zip issues, you need to install the corresponding PHP extensions. On Debian-based systems like Ubuntu, this is straightforward:
sudo apt-get install php-bz2 php-zip
On CentOS or RHEL, you would typically use:
sudo yum install php-bz2 php-pecl-zip
After installation, you must restart the web server (Apache or Nginx) and reload PHP-FPM if applicable to load these new modules. Verify they are active by creating a phpinfo() file or checking the output of php -m.
The trade-off here is minimal: adding these libraries consumes negligible memory and CPU resources while significantly expanding your ability to handle different export/import formats. However, you should be aware that some hosting environments or Docker containers might come pre-configured with only specific extensions. If you are building a custom stack from source, ensure you pass the correct flags (--with-bz2, --with-zip) during compilation, though using package manager binaries is almost always preferable to avoid version mismatches between the Apache/PHP versions.
If you continue to see the "MySQL extension missing" error despite removing the legacy extension and updating phpMyAdmin, inspect your php.ini for any custom configurations added by a hosting provider or a previous installation attempt. There may be a virtual host configuration or an .htaccess file forcing the loading of a specific PHP module that conflicts with the current runtime.
For developers managing production environments, relying on deprecated APIs is a security liability. If you are maintaining legacy code that depends on these extensions, consider refactoring to use mysqli or PDO immediately. The phpMyAdmin team has moved away from supporting the legacy extension precisely because it forces users to maintain insecure code paths. Upgrading your phpMyAdmin installation to the latest stable version is likely the most robust solution, as newer builds do not require the mysql extension and offer better handling of compression formats out of the box.