How to fix error # 1045 in phpMyAdmin

Who I am
Joel Fulleda
Author and references

After installing a local server trying to access phpMyAdmin, you may encounter the following error: # 1045 Access denied for user 'root' @ 'localhost' (using password: YES) or #1045 Access Denied for user ‘root’@’localhost’ (using password: YES).

If root @ localhost does not have the necessary rights to access the database or you have provided an incorrect password, this error may occur.

By reading this tutorial you will have the solution for bypassing this error in any local host server using phpMyAdmin.

If you get a error # 1045 in phpMyAdmin which similar to the picture below:



Step 1: Open your MySQL console


  • Using WAMP, right-click on its icon located at the bottom right of your desktop and select MySQL Console.

Step 2: Enter the following command lines



If you have a password, ignore this part

  • Write use mysql;
  • Awards Enter.
  • Set your MySQL Password: UPDATE mysql.user SET Password=PASSWORD(“EnterYourPasswordHere”) WHERE User=”root”;
  • Replace "EnterYourPasswordHere”With the password of your choice.
  • Awards Enter.
  • Flush i privilegi: FLUSH PRIVILEGES;
  • Write : Exit
  • Awards Enter.


Step 3: Open and edit your located on your local server


  • Use a text editor like Notepad ++ to open your file
  • Go to Computer> C:> (your Local Server folder, WAMP / MAMP / XAMPP)> APPS> PHPMYADMIN> 
  • Find the following line in the code: $cfg[‘Servers’][$i][‘password’] = ”; // MySQL password
  • Change 'password' to a new password you chose and created in Step 2.
  • Click on Save.


Step 4: Access phpMyAdmin


  • You can now log into phpMyAdmin by going to http: // localhost / phpMyAdmin /
  • Congratulations! you are now enabled to access your database. 

Attention if you still have problems logging in, try replacing in the following line of code:


with this:



Check out these links too:

Adriana gil We are a specialized and passionate team of virtual reality. We have extensive experience in this area. We decided to create ForVirtualRealityLovers to share all our information with customers and users. We have quality information. You can find tips, guides, interviews, top products and much more! If you are curious, enter our site and discover the virtual world! 😉 How to unblock right click on all sites ❯

Articles related to

Find the path of the linked tables in Access with VBA
How to delete blank lines in Word
Programs to delete undeletable files
How to recover deleted files on hard disk
How to print the structure of an Access table
How to repair damaged DOC, DOCX, PPT, PST, RAR, ZIP and MOV files
Add a comment from How to fix error # 1045 in phpMyAdmin
Comment sent successfully! We will review it in the next few hours.


  • How to create a Web Api Website for Windows Azure
  • How to update the old Office with the new Office 2016
  • How to count cells with text in Excel
  • How to back up your data
  • Come recuperare un database in “Suspect State” in Sql Server
  • How to recover unsaved Word or Excel file
  • How to create a visitor counter in Php
  • PDFelement 6 the best program to create, edit and convert PDF Mac
  • The best Microsoft Office alternatives for home and office
  • How to add Word dictionary
  • How to program PC power on from the BIOS
  • How to copy text from a protected Word document
  • How to recover a Word document
  • How to color alternate rows in Excel
  • How to unlock a Word document
  • Windows starts slow
  • Best sites to convert PDF to Word online
  • Best external hard drives 2021: buying guide
  • Best programs to uninstall on Windows 10
  • How to count the beats in Word
❤️Chi Sleep For Virtual Reality Lovers?

For Virtual Reality Lovers we are a team of people who aim to give you all the best information about Virtual Reality.

What information do we share?

We share everything you need to know about virtual reality, tips, prices, features, guides and much more !.

🤖What are the best virtual reality products?

We have the best information section on the best virtual reality products.

This work is under a Creative Commons Attribution-Non-Commercial-No Derivatives 4.0 International License. 2021/ X

Check out our best articles!

Programs to delete undeletable files

How to compare two text files

Programs to delete unnecessary files

How to download and clone an entire website

add a comment of How to fix error # 1045 in phpMyAdmin
Comment sent successfully! We will review it in the next few hours.