MySQL is one of the most popular Database today used by most website. in fact top custom management system like WordPress, Joomla, Drupal, concrete5 and lots more uses it. to further buttress it importance, it among the popular LAMP (Linux, apache, MySQL, PHP) web-development acronym. The aim of this article is to explain how to change a forgotten MySQL database user’s password either from cPanel or using phpMyAdmin.
My MySQL Ordeal
I created a forum using simple machine forum(SMF) software, and everything was going fine. it came to a time i was becoming very busy that i didn’t have time for the forum, to conserve my host bandwidth, i had to delete the forum with the database in-tact.
After some time, I created this blog and decide to move some of the post in the forum to blog. to accomplish this goal, i had to create an SMF forum again with my old forum database. When filling the forum MySQL details, i couldn’t remember the database user’s password. so i had to look for a way to over-write the previous password. if you’re going through such a problem, then continue reading.
How To Change MySQL User’s Password Via phpMyAdmin
To me, this is the simplest method in changing database user’s password.
- Login to phpMyAdmin and navigate to your database, on the database page click on privilege tab, and then click edit privilege next to the database user.
- On the Edit Privilege page scroll down and follow the instruction on the image below to successfully change/over-write the old password.
NOTE You can also do this by creating a new user with same username and a new password.
How To Change MySQL User’s Password Via cPanel
Changing Database password is quite similar to that of phpMyAdmin above. all you need do is remove the old user you’ve forgotten it password and create another user with same username and a new password. follow the steps below to do this.
- Login to cPanel, scroll down and click on MySQL® Databases
- Follow the instruction in the image below to change the MySQL user password.
After over-riding the previous user with a new password, you can now go to your CMS or website database settings and update it with the new password.