Page 1 of 1

phpMyAdmin change password problem & access denied

PostPosted: 25. August 2010 15:23
by CunningBadger
Firstly apologies but I am very new to both phpMyAdmin and mySQL.
I set up the newest version of XAMPP and set up a mySQL database called test and filled it with data.

When I was attempting to link it up with php through phpMyAdmin I decided to set a password. I went for something easy 'root'.

My first error was after changing the password it immediately kicked me out of phpMyAdmin saying this
#1045 - Access denied for user 'root'@'localhost' (using password: NO)

After reading up on a few forums I realised it was a problem with the config.inc and so I changed
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';


in config.inc to

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


this let me in to phpMyAdmin but only so far if I attempted to go into my database 'test' it wouldn't let me any further giving me another error. Noticing 'pma' the other user had no password as well and you could set the password through mySQL, I tried to use this method to change the password back for.

Unfortunately now it won't let me into anything I have tried editing the config.inc to original state and changing the password fields.

This error appears:
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
Connection for controluser as defined in your configuration failed.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.


It is set up on a localserver.

Please advise and thank you for your time.

Re: phpMyAdmin change password problem & access denied

PostPosted: 25. August 2010 15:29
by Altrea
If you change any passwords, be sure you end your browser completely. Otherwise running sessions will not be cleaned up and this can produce such issues. (even better delete your temporary internet files and cookies too)

pma is just a limited control user for phpmyadmin. If you use xampp only for testing, it had not to be password protected.

If you give root a password, don't post it in the config file. Change the phpMyAdmin auth method to Cookie, so you will get a
login form.

Re: phpMyAdmin change password problem & access denied

PostPosted: 25. August 2010 15:56
by CunningBadger
That's great thank you for your help.

I just cleared the cache and history and closed browser and worked fine once I changed the config file back to its original form.

Cheers again,

Re: phpMyAdmin change password problem & access denied

PostPosted: 25. August 2010 15:56
by Altrea
Glad it worked for you :D
have a nice time with xampp