Skip to content
Imran Online

Imran Nazir Dubai Blog - Software Engineer- Computer Master

  • Home
  • Services
  • About
  • Contact
  • Home
  • Services
  • About
  • Contact
Home » phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user ‘pma’@’localhost’ (using password: NO)
Posted inLibrary

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user ‘pma’@’localhost’ (using password: NO)

Posted by By imran November 22, 2023

In a previous article, I explained how to change MariaDB with MySQL 8 in a local installation of XAMPP for Windows. This procedure works and it’s just perfect for your local environment, however, in some installations a couple of errors that don’t interfere with the default behaviour of the tool may appear. One of those exceptions is the following one: mysqli::real_connect(): (HY000/1045): Access denied for user ‘pma’@’localhost’ (using password: YES).

Solving exception

The first thing you need to do is to access the MySQL CLI and log in as root (which is what you usually do in XAMPP locally, there’s no password as well):

mysql -u root -p

In case that your setup is different and it does contain a password, you will need to provide it (or leave empty if you don’t). After accessing the command line, you need to run the following query that will create the PMA user without a password (it is usually empty for local development):

Run the following command in phpmyadmin:

-- Create the PMA user without a password ---
CREATE USER 'pma'@'localhost' IDENTIFIED BY '';

After creating the user, you need to provide the control user credentials in the xampp/phpMyAdmin/config.inc.php file. These lines exist already, so be sure to search them in the file and update the user and password. In this case, as specified in our query, the user is pma and there’s no password:

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

Finally, restart the MySQL service and access PHPMyAdmin once again. You shouldn’t see the exception ever again!

Happy coding ❤️!

Tags:
Access Denied Error in phpMyAdminDatabase Connection TroubleshootingFix MySQL Login IssuesMySQL Error HY000 1045 FixMySQL Password Error SolutionsphpMyAdmin Access Error GuidephpMyAdmin Configuration TipsphpMyAdmin mysqli_real_connect ErrorphpMyAdmin User Authentication IssueResolve pma@localhost Access Denied
Last updated on January 27, 2025
imran
View All Posts

Post navigation

Previous Post
Boost Your Productivity: 10 Essential VS Code Shortcuts for Web Developers
Next Post
Upgrade MySQL 8 in XAMPP from MySQL 5.7 or 5.4
Post You Might Like
Posted inTechnology Trends
OpenAI’s New Frontier: An AI Browser to Rival Chrome
Posted by By imran July 30, 2025
Posted inLibrary
How to Make a Textarea Automatically Resize in One Line (No JavaScript)
Posted by By imran July 16, 2025
Posted inDigital Marketing & SEO Technology Trends
SEO in 2025: SEO, AIO, GEO, AEO, SXO… What Do They All Mean?
Posted by By imran May 22, 2025
Posted inProject Management Software Development
Focus on the product, not the tech stack
Posted by By imran May 20, 2025
Copyright 2025 — Imran Online.
Scroll to Top
Contact Me