How to add a user to a MySQL database (privileges)
On this page
A database user can only work with the databases it has been added to. Adding a user gives it all privileges on that one database, which is what websites and applications need.
Add a user to a database
- Log in to the control panel (
https://<server>:2083). - Open MySQL Databases (section Databases).
- Under Add user to database, choose the User and the Database.
- Click Grant all privileges.
You see Privileges granted. The user's name appears under Privileged users next to the database.
Remove a user from a database
- In the Databases list, find the user's name under Privileged users.
- Click the × next to it (Revoke).
You see Privileges revoked. The user still exists but can no longer open that database.
Which privileges the user gets
All privileges on that database only: reading and changing data, creating and changing tables, indexes, views, triggers and stored procedures. The user cannot see or change other databases, and cannot create new databases — create those in MySQL Databases.
Good to know
- Choosing individual privileges (for example read-only) is not offered: a user added to a database always gets all privileges on it. If someone must only read the data, give them an export or a separate copy of the database.
- Changes apply within a few seconds.
- If you allowed addresses in Remote MySQL, the same privileges apply when the user connects from those addresses.
- Deleting a user (Delete in Database users) removes it from all databases.
Common questions
The button "Grant all privileges" is greyed out. Why?
You need at least one database and one database user first.
Do I need to grant again after changing the password?
No. Privileges stay when you change the user's password.
Thank you — this helps us improve the article.
Still stuck?
Ask the AI about your exact situation — it answers from this knowledge base — or contact us.
Related articles
- How to create a MySQL database and database user
Create a MySQL (MariaDB) database and a database user in the control panel, add the user to the database, and get the details your website needs.
- Error establishing a database connection or access denied
Fix "Error establishing a database connection" and MySQL "Access denied for user" errors: wrong name prefix, password, privileges, host or remote access.
- How to allow remote MySQL access from your computer or server
Let a desktop tool or an app on another server connect to your MySQL databases on port 3306 by allowing its IP address or range in Remote MySQL.