How to change permissions for a database user in Hostinger

Changing permissions for a database user in Hostinger dashboard

Updated 1 week ago

Change permissions for a database user in Hostinger to control what a MySQL user can do with its database, for example to make a database read-only. On the database’s page, click Change next to Access, then choose Full access, Read and write, Read only, or pick individual privileges.

Before you start

Change database user permissions

Every MySQL user has Full access to its database by default. Change the access level in the Change MySQL user permissions window.

  1. Go to Websites → Manage site and select Databases in the left sidebar.
  2. Click › next to the database.
  3. In the Connection card, click Change next to Access.
  4. Select one of three access levels:
    • Full access – everything your app may need. This is the recommended option.
    • Read and write – read and change data, but not the tables themselves.
    • Read only – only read data, for example for reports and analytics tools.
  5. Click Update.

To change the permissions of a database assigned to another website, click View plan databases on the Databases page, click ⋮ next to the database, and select Change permissions.

Choose individual MySQL privileges

Click Choose privileges in the Change MySQL user permissions window to pick each privilege yourself. The privileges are grouped into three sections:

  • Data – SELECT, INSERT, UPDATE, and DELETE.
  • Structure – CREATE, ALTER, DROP, INDEX, REFERENCES, CREATE VIEW, SHOW VIEW, and CREATE TEMPORARY TABLES.
  • Advanced – CREATE ROUTINE, ALTER ROUTINE, EXECUTE, TRIGGER, EVENT, and LOCK TABLES.

Clear the checkbox next to a privilege to revoke it, then click Update to apply the changes.

Additional resource