Ads

Ads

Translate

Saturday 5 January 2013

#1045 Access Denied for user 'root'@'localhost' (using password: YES).

By Fajar  |  January 05, 2013 No comments

After installing a local server and trying to access phpMyAdmin, you could possibly encounter the error: #1045 Access Denied for user 'root'@'localhost' (using password: YES).
If root@localhost wasn't granted the necessary rights to access the database or you provided the wrong password, you will then encounter this error.
Following this tutorial will help guide you on bypassing this error, for any local host server using phpMyAdmin.
If you get an Error #1045 in phpMyAdmin it will look like the image below:
tutuploadsphpMyAdmin-Access-Denied.png

Step 1: Open your MySQL console.

tutuploadsmedia_1338949643300.png

Step 2: Enter the Provided Command Lines

tutuploadsmedia_1338949812597.png
If you have a password, you can ignore this part.
  • Type in: use mysql;
  • Press Enter.
  • Set your MySQL Password: UPDATE mysql.user
SET Password=PASSWORD("EnterYourPasswordHere")
WHERE User="root";
  • Replace "EnterYourPasswordHere" with your new chosen password.
  • Press Enter.
  • Flush the privileges: FLUSH PRIVILEGES;
  • Exit by typing: Exit
  • Press Enter.

Step 3: Open and edit your config.inc.php file located in your local server files

tutuploadsmedia_1338949961143.png
  • Using a text editor, such as Notepad++, open your config.inc.php file.
  • Go to My Computer > C Drive > (Your Local Server Folder, WAMP/MAMP/XAMPP) > APPS > PHPMYADMIN > config.inc.php
  • Find this line of code: $cfg['Servers'][$i]['password'] = ''; // MySQL password
  • Change 'password' to the new chosen password you created from Step 2.
  • Click Save.

Step 4: Access phpMyAdmin

tutuploadsphpmyadmin7.png
  • You can access phpMyAdmin by going to http://localhost/phpMyAdmin/.
  • Congratulations! You are now able to access your databases.

Author: Fajar

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

0 comments:

Best Post This Year

Install Fortesreport community Delphi 7 dan RX Berlin

Download  Pertama2 kita harus punya file installernya terlebih dahulu, download  https://github.com/fortesinformatica/fortesrepo...

Total Pageviews

© 2014 Fajar Priyadi. WP themonic converted by Bloggertheme9. Published By Gooyaabi Templates | Powered By Blogger
TOP