This document contains information on how to create, modify, and delete database users in Plesk, and how to define their permissions.
Plesk accesses each database on behalf of a user associated with it. Therefore, each database needs at least one user; if it doesn't have any, you won't be able to access it.
Access: log in to the client portal, open your service, and click on Log in to Plesk. Then go to Websites & Domains → Databases → User Management.
User types
- Single-database user: only accesses the database you assign to them. This is the recommended option to grant access to a third party, such as a developer, without exposing the rest of your databases. You create the database first and then the user.
- Universal user: accesses all your databases, including the ones you create later. This can be useful if you install several web applications and want to use the same user in all of them. You create the user first and then specify it when installing each application.
Important: a universal user only works within one server type. If you use MySQL and Microsoft SQL Server databases, you need a universal user for each. For security reasons, do not share a universal user with third parties.
Default user
If a database has multiple users, you can mark one as default. Plesk always uses their credentials to open the database from the panel. If none is marked, it uses the first one in the list.
Create, modify, or delete a user
- Create: in User Management, add a new user, fill in the name and password, and choose the database they will access. To create a universal user, choose Any in the Database field.
- Modify or change password: click on the user's name, make the changes, and accept.
- Delete: select the user and delete them.
Keep the following in mind:
- A default user cannot be deleted directly. First edit them, uncheck the option Set this user as default for this database, and then delete them. They are also deleted if you delete the database they are associated with.
- If the user was created by an application installed from the panel, they are only deleted when uninstalling that application.
- The password must be at least 5 characters long, cannot contain the username, and does not support extended special characters, such as accented letters or the tilde (ñ). We recommend using a longer one with letters, numbers, and symbols.
Permissions (roles)
Permissions define what the user can do with the data and the database structure. To simplify them, Plesk uses predefined sets called roles:
- Read and write: this is the role assigned by default to new users.
- Read only: the user can query the data, but not modify it.
- Write only: the user can upload and modify data, but not read it.
- Custom (MySQL only): assigned only when you check or uncheck individual privileges.
Change permissions for a MySQL user
- In User Management, click on the user's name.
- Choose the role: Read and write, Read only, or Write only.
- If you need to adjust a specific setting, check or uncheck the boxes for each privilege. For example, you can allow querying, inserting, or modifying data, and creating or dropping tables. When doing this, the role changes to Custom.
- Click on OK.
Change permissions for a Microsoft SQL Server user
- In User Management, click on the user's name.
- Choose the role: Read and write, Read only, or Write only.
- Click on OK.
In Microsoft SQL Server, each Plesk role includes these database permissions:
| Permission | Read and write | Read only | Write only |
|---|---|---|---|
| db_backupoperator | Yes | Yes | Yes |
| db_datareader | Yes | Yes | No |
| db_datawriter | Yes | No | Yes |
| db_ddladmin | Yes | No | Yes |
Remote access control
If your service allows it, when creating or editing a user you will see options to define where they can connect from: only from the same server, from any computer, or only from the IP addresses you specify. The safest practice is to allow only local connections, unless you need to connect from the outside. In that case, limit access to your IP address.
If you don't see these options and need external access, contact us via support ticket.
Common issues
- I cannot delete a user: they might be marked as default or created by an installed application. Review the two cases in the previous section.
- The application stopped connecting after changing the password: update the new password in the application's configuration file.
- My application throws errors when saving data: check that the user does not have the Read only role.
- I cannot create more users or databases: you have reached your service limit. You can upgrade it by contacting the sales department from the client portal or via the online chat.
If you need help with your database users, open a ticket from the client portal or check the site's online chat.
