Phpmyadmin ERROR: Mysqli_real_connect(): (hy000/1045): Access Denied For User ‘pma’@’localhost’ (using Password: NO)

The error message indicates that the user ‘pma’ is being denied access to connect to the MySQL server via phpMyAdmin without providing a password.

To fix this issue, you can try the following solutions:

  1. Verify the phpMyAdmin configuration file (config.inc.php) and make sure the correct username and password are set.
$cfg['Servers'][$i]['user'] = 'pma';
$cfg['Servers'][$i]['password'] = 'your_password';

Replace ‘your_password’ with the actual password for the ‘pma’ user.

  1. Check if the ‘pma’ user exists in the MySQL server. If not, you can create it and grant necessary privileges:
CREATE USER 'pma'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON *.* TO 'pma'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Replace ‘your_password’ with the desired password.

  1. If you recently changed the password for the ‘pma’ user, make sure to update the password in the phpMyAdmin configuration file.

  2. Restart the MySQL and web server to ensure the changes take effect.

If none of the above solutions work, check if there are any other access restrictions or configuration issues in your MySQL server setup that could be causing the problem.

About the Author Rex

I'm a passionate tech blogger with an insatiable love for programming! From my early days tinkering with code, I've delved into web dev, mobile apps, and AI. Sharing insights and tutorials with the world is my joy, connecting me to a global community of like-minded tech enthusiasts. Python holds a special place in my heart, but I embrace all challenges. Constantly learning, I attend tech conferences, contribute to open-source projects, and engage in code review sessions. My ultimate goal is to inspire the next generation of developers and contribute positively to the ever-evolving tech landscape. Let's code together!