cPanel: Locking and Unlocking Databases
For extra security, you can lock website databases to readonly, as follows:-
Locking Databases
-
Once logged in the account's cPanel, scroll down to the Databases section, and click on MySQL Databases.
-
Locate the website's database. Normally the database name has the URL/domain in it. For example, in this example, the database name is
homecook_aoto_live
. Click on the Privileged User corresponding to it.
To be sure of which database to select, you can check the website code or ask the website programmer or maintainer. -
Once inside the Privileged User page, you should see that all options are ticked. This is the default/usual setting. To lock the database, you need to untick ALL PRIVILEGES, and scroll down and tick SELECT.
-
The end result should be as follows:-
-
Click on Make Changes, the database is now locked.
Unlocking Databases
The procedure is exactly the same as locking databases in the previous section, except the database privileges settings are opened to ALL PRIVILEGES, as follows:-
-
As with locking the database, you should identify the database and access the database's Privileged User page. For a locked database, this time you should see that only SELECT option is ticked. To unlock the database, you need to tick ALL PRIVILEGES, and scroll down and click Make Changes.