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:
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:
- Access and map Synology NAS DS713+ files inside your network
- Access and map Synology NAS DS713+ files outside your network
- or you can use FileStation.
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.
Enjoy!
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?
Hi Daniel,
It is enough to change the root password.
Ruth
Thanks Ruth,
Worked for me.
Glad it worked! Ruth
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.
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
Fantastic Art!! Glad it worked 🙂
/Ruth
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 mohanmekap.com is up and running. thanks.
Yey!!! Thanks for the feedback 🙂
/Ruth
Our database (php) password isnt getting effected. I changed the password but unable to login with the new password. Can you please help?
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…
I don’t know how blue host works, but maybe somebody here knows?
/Ruth
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.
Thank you!
The pleasure is all mine 🙂
/Ruth
Thank you! You’re a lifesaver.
My pleasure Justin!
/Ruth
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