What is this error?
phpMyAdmin is a web page for managing databases. It is written in PHP. To talk to MySQL, PHP uses a helper called an extension. An extension is a small add-on that gives PHP extra skills. The one phpMyAdmin needs is called mysqli.
The error can look like one of these:
- "phpMyAdmin - Error: The mysqli extension is missing."
- "mysqli_real_connect(): (HY000/2002): No such file or directory."
- "mysqli_real_connect(): (HY000/1045): Access denied for user."
Each message points to a different cause. Read yours closely.
Case 1: The extension is missing
On shared hosting, in cPanel:
- Open Select PHP Version (or MultiPHP Manager, depending on your setup).
- Look at the list of extensions.
- Tick
mysqli. If you seend_mysqli, that works too. - Save and reload phpMyAdmin.
On a VPS with root access, install it with your package manager. On CentOS-style systems:
yum install php-mysqlnd
systemctl restart httpd
The first line installs the MySQL part for PHP. The second restarts the web server so it loads the change. On Ubuntu, use apt install php-mysql instead.
Case 2: "No such file or directory" or connection refused
This means PHP cannot find the MySQL server.
- Check that MySQL is running. In WHM, use Restart Services and pick SQL Server (MySQL). On a VPS, run
systemctl status mysqld. - Check the host setting in phpMyAdmin's config. It should normally be
localhost. - Check that the disk is not full. A full disk can stop MySQL.
Case 3: "Access denied"
The username or password is wrong.
- Log in to cPanel and open MySQL Databases.
- Reset the password for the database user.
- Update the same password in your app's config file.
Case 4: PHP version change
The error can start after you change the PHP version. Switch back to the earlier version and test again. Make sure mysqli is on for the new version.
Quick recap
- phpMyAdmin needs the PHP
mysqliextension. - Turn it on in the PHP extensions list.
- Check that MySQL is running for connection errors.
- Reset the password for "Access denied".
- Contact support with the exact message if stuck.