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 Config.inc.php located on your local server
- Use a text editor like Notepad ++ to open your Config.inc.php file
- Go to Computer> C:> (your Local Server folder, WAMP / MAMP / XAMPP)> APPS> PHPMYADMIN> config.inc.php
- 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 Config.inc.php the following line of code:
$cfg[‘Servers’][$i][‘auth_type’]=’config’;
with this:
$cfg[‘Servers’][$i][‘auth_type’]=’cookie’;
Check out these links too:
- ostraining.com/blog/coding/error-1045-phpmyadmin/
- stackoverflow.com/questions/1045-access-denied-for-user-rootlocalhost-using-password-no
- wiki.ubuntu-it.org/Server/MySql/PasswordReset
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 ForVirtualRealityLovers.com 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 filesAdd a comment from How to fix error # 1045 in phpMyAdminSoftware
❤️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/primerpaso.me 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 |