HOW TO CHANGE EVERYONES PASSWORD IN SQL WITH PHPMYADMIN (including roots)
NOTE: if you only want to change roots password, log in as another user. If you logged in as another all powerful user to phpmyadmin: Start from step 11. If you dont have another all powerful user login as root to phpmyadmin and start from step 9, we will make an all powerful user (that you can keep or later delete).

1. log in as root
2. go to privileges
3. look at user list, decide which users you will change password of
4. export users sql data (has hash of password), save to notepad (make a note this is “user X old pw”)
5. click on pencil next to name and change password in new popup window (2 locations to change passwords, I just used top location where you just put in new password and then again for confirmation, and hit go)
6. after hitting go the popup window will go away, at top you will see if password change worked
7. export users sql data (has hash of password), and you will see if password change worked (password hash will be different), save this to notepad under previous note (make a note this is “user X new pw, and password is this: ****”)
8. Repeat step 5 thru 7 for every user.

If couldnt change password for root continue, but need to then follow these extra steps:
NOTE: To change password for current user, you need to be logged in as another user that has the rights to change passwords
NOTE: if you changed every “root” password, like “127.0.0.1” and “::1” and for “<hostname>”, but not for “localhost”, then when trying to login to phpmyadmin make sure you use root@locahost password. phpmyadmin doesnt use the otherones. (Im making this statement when Im login in to my phpmyadmin from a remote session as well: www.infotinks.com/phpmyadmin, even though thats remote, apache2 will log in to phpmyadmin using root@localhost always)

9. You will realize you cant change “root” password for “localhost” but you can for “127.0.0.1” and “::1” and for “<hostname>”. Why cant for “localhost”? because logged in.
Solution: Log in as another all priviledged user. If you dont have one make one called “master” with all privildges and access (so it will be as power as root user). Make a note of its password. And also export its users sql, and make note of it “this is new master user with password: *******”
10. log out of root@localhost
11. log in as master user, or your other all powerful user
12. repeat steps 4 thru 7 on root@localhost user (no need to change on other root users as we already took care of that)
13. log out as master user, or your other all powerful user
14. log back in as root, now roots new password will work
15. quit after confirming, or delete your new master user if you dont want it (if delete, then delete the note you made for it)

NOTE: if changing root password, you better change it on all users. Note I noticed that my root@127.0.0.1 didnt have a password, I still gave him a new password and everything still works. Its better for every root user of every host to have the same password on the same sql database.

Leave a Reply

Your email address will not be published. Required fields are marked *