Access Denied Error phpMyAdmin and WAMP

Nillouch -  
 loicosquaredemadrid -
Hello everyone,
I have a problem with phpMyAdmin. In fact, while trying to install a PHP script, I had to add a password to the privileges of the root user, but after the installation, phpMyAdmin no longer wants to open and displays the following error: Access denied

Welcome to phpMyAdmin

Error
MySQL responded:

#1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpMyAdmin attempted to connect to the MySQL server, and the server rejected the connection.
Please check the values of host, username and password in your configuration and make sure they match the information provided by the MySQL server administrator.


Can you please help me? :)

Thank you

2 answers

Tagadah Posted messages 1 Status Member 14
 
Go to C:\wamp\Apache2\conf\alias\phpmyadmin.conf
Replace the line "Allow from 127.0.0.1" with "Allow from all" and restart the services.

If that doesn't work, start WAMP and open MySQL in command line and type:

SET PASSWORD FOR root@localhost=PASSWORD('mypassword');
mysql> GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'mypassword' WITH GRANT OPTION;

Then go to wamp/apps/phpmyadmin3.4.5/config.inc.php:
Modify the following lines:

$cfg['Servers'][$i]['host']= 'localhost';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password']= 'mypassword';

Finally, go to WAMP, open the php.ini file, and modify as follows:

; Default host for mysql_connect() (doesn't apply in safe mode).
mysqli.default_host ='localhost'
; Default user for mysql_connect() (doesn't apply in safe mode).
mysqli.default_user ='root'
; file will be able to reveal the password as well.
mysqli.default_pw ='mypassword'

There you go!
If now, just like me, you really have no luck, you can always try to change the name of the wamp folder.

Make sure you have the rights to start the services, and especially check the default aliases!!

Good luck;D
14
Azen0x
 
Thank you, tagabah, it works!
0
psadjo Posted messages 1 Status Member
 
It's cool! It works for me too. Thank you soooooo much!
0