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”

php

 

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

php

 

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

php

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

php

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:

access

 

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

add

Now your website will go back online.

Enjoy!

5 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?

    Like

  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.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s