Reputation: 51
I have installed XAMPP in localhost:8080 but I can't access phpmyadmin with a message error:
[ MySQL said: Documentation#1045 - Access denied for user 'root'@'localhost' (using password: NO) ]
Upvotes: 2
Views: 14123
Reputation: 1102
Step 1
Open your MySQL console
For Xampp follow this guide Access-mySQL-command-line-in-xampp
Step 2
Enter the Provided Command Lines 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
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
You can access phpMyAdmin by going to http://localhost/phpMyAdmin/.
Congratulations! You are now able to access your databases.
Upvotes: 1