Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Fix the MySQLi Error in phpMyAdmin

If phpMyAdmin shows a "mysqli" error, this guide helps you find the cause and fix it.

Databases2 min read10 steps

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:

  1. Open Select PHP Version (or MultiPHP Manager, depending on your setup).
  2. Look at the list of extensions.
  3. Tick mysqli. If you see nd_mysqli, that works too.
  4. 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.

  1. Check that MySQL is running. In WHM, use Restart Services and pick SQL Server (MySQL). On a VPS, run systemctl status mysqld.
  2. Check the host setting in phpMyAdmin's config. It should normally be localhost.
  3. Check that the disk is not full. A full disk can stop MySQL.

Case 3: "Access denied"

The username or password is wrong.

  1. Log in to cPanel and open MySQL Databases.
  2. Reset the password for the database user.
  3. 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.

Tip: If you cannot find the cause, send the exact error text to Hostvento support at https://secure.hostvento.com/submitticket.php.

Quick recap

  • phpMyAdmin needs the PHP mysqli extension.
  • 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.