execute
flush privileges;
Main Topics
Browse All TopicsI'm trying to change the password of the root user for MySql (right now the root uses no password). So, to change that, I go to the admin page (http://localhost/phpmyadm
However, I can still use other clients such as 'MySQL Query Browser' to login to the database without password (If I use the new password, it gives me error message).
So, how do I change the password of a user from MySQLAdmin?
Also, there are 2 forms in the phpMyAdmin (http://localhost/phpmyadm
Thanks,
Dan
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
SET PASSWORD FOR 'username'@'%' = PASSWORD('newpass');
You will have to change the username part (to probably pma) and the % part (to probably localhost).
So it becomes:
SET PASSWORD FOR 'pma'@'localhost' = PASSWORD('newpass');
For information on the SET PASSWORD command see: dev.mysql.com/doc/refman/5
To see exactly what user and domain (the localhost/% part) your account is using do:
SELECT User, Host FROM mysql.user;
That should show you all your mysql user accounts. Look for the one that looks like it's for PHPMyAdmin (probably pma).
Resouce:http://forums.digi
Tony, I'm going to try your solution. But do you know if phpMyAdmin saves the username/password in some config file? I've seen many posting on Internet that suggest using mysqladmin command line; however, in my view that doesn't work since then phpMyAdmin has no idea about the new username/password. I actually did change the password for root user using the admin gui, but then phpMyAddmin couldn't start probably because it didn't know about the new password.
Another update. The solution actually didn't work. After I executed your solution, and restarted phpMyAdmin, I get the following error message:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
Again, it seems that the password is changed in MySQL, but not in phpMyAdmin. Do I have to set some configuration in phpMyAdmin which tells it to use password?
It sounds to me like your phpMyAdmin has it's username & password hardcoded into your config.php file. If that is the case, you will need to change your root password via the command line and then modify your config.php for phpMyAdmin so that it uses the new password. Then all will be well in whoville. :)
~A~
Business Accounts
Answer for Membership
by: adrian_brooksPosted on 2009-09-25 at 18:39:00ID: 25428431
Okay...in your phpMyAdmin, does your root account have more than one entry in the user manager page?
If so, please take account of each host setting root can login under.
Secondly...do you have shell access to your server? If so, try running this at the command line;
mysqladmin -u root password yourrootsqlpassword
Hope this helped.
~A~