Change SQL database password · Secure your NAS

Change password on your SQL database with phpMyAdmin

To prevent your database to be accessed by unathorized people, it is highly recommended to change the password of your SQL database.

IMPORTANT: When you change the database password, you need to change also in your wp-config file. I will show how to this in the tutorial, but until you have done the changes in both places, your website will not be accessible.

To do this, access phpMyadmin, by clicking on the icon in your Synology:

access phpmyadmin synology ds713

Once inside phpMyAdmin, click on “Users”



Click on the User “root” whose Host is “localhost” and click on “Edit Privileges”



Scroll down until you see the Change Password section. Enter your new password and click “Go”.


If you have done everything correctly, you will see the following message:


At this point, your wordpress site will not be able to access the contents of the database until you have updated the password on your wp-config file. Let’s do that:

There are many ways you can access your files:

The wp-config file is located under your Web folder>Name of your site>wp-config. An example:



Open it with your text editor, I use Note++, add your new password between the brackets ex. ‘password’ and upload it back:


Now your website will go back online.


18 thoughts on “Change password on your SQL database with phpMyAdmin

  1. Under users I have:

    User | Host
    Any | localhost
    Any | [MyServerName]
    root | localhost

    I changed all three to have passwords. Does it make sense to do that?

  2. mysql
    update user set password=PASSWORD(“******”) where User=’root’;
    flush privileges;

    This way you do all accounts from root, default install for mariadb these days has more then one, so you could easily circumvent it by doing “mysql -h ” since that has no password on that account then.

  3. Thanks for this… I came across more than 5 inanities on google searches, in response to this questions, and then I found this… Plain and simple this is the answer. Thanks again

  4. Yours tips absolutely rocks, I changed database password and then site is down and by following and pasting the password on wp-config and now my website is up and running. thanks.

      1. Our database (php) password isnt getting effected. I changed the password but unable to login with the new password. Can you please help?

  5. I don’t see a Users tab in my phpMyAdmin browser (I logged in through Blue Host, which recently suspended my account because it was hacked. I’m trying to fix the hack, which is why I need to change the database user password). All I see at the top is “Databases, SQL, Status, Export…” There is no “Users” tab anywhere…

    1. I think there is no USERS tab in 2018. Your Cpanel should have a separate option that says MySQL® Databases (aside from phpmyadmin), that is where you can check the username and change the db password.

  6. I tried to access the server via PHPMyadm in the browser. Access has been denied using password. How can I reset the password in order to access the server? I don’t have PHPadm installed in my computer. Thank you

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.