This goal of this blog post is to show WordPress beginners how to change the database user password. When you don’t remember the password of the database user account, the only option is to create a new user account or change the password for the current account.

You may not have to do this once WordPress is setup and working. The only reason you will have to mess with WordPress configuration file, (wp-config.php) is when you delete, modify or mess with it. As long as your blog is functioning, there’s no need to touch this configuration file.

Now, when that day comes and WordPress config file is no longer available or has been changed, then you’ll need to go and redo the configuration. Without specifying the database name, database username and password, WordPress will not work.

This brief tutorial is going to show you how to find  and change the database user password if you can’t remember it.

Here’s what happened to me a long time ago.

I had just installed my first WordPress site and everything seems to be working just fine.. until I decided to go and edit the wp-config.php file.

I made all the changes I wanted to make and save the file. When I tried to access my blog and got a message that WordPress cannot connect to the database.

Some kind of database connection error. I went back to the file and verified everything. I soon realized that the password I typed might be different than what was created for the database user.

It turned out that I had forgotten it. Didn’t know it and was stuck. The only way around this was to reset the database user password.

When you’re using CPanel as your host tool, all you need to do is go to MySQL Databases as shown below and select the username you wish to reset the password.

 

mysql-password-reset

 

At the bottom of the page you’ll see current users. Select to account you wish to change the password.

 

mysql-password-reset-1

 

Then type and confirm the new password and save it by clicking the Change Password button. This is how you change a MySQL database user password.

 

mysql-password-reset-2

 

Next, go back to the wp-config.php file and type the correct password for the account. When you’re done, save the file and try connecting to your website again.

Hopefully this time it will work.

That just what I didn’t when I forgot the password of the database user for WordPress.

Enjoy!