Most content management systems require a database. Plesk supports MySQL/MariaDB, PostgreSQL and, on Windows servers, Microsoft SQL Server, and lets you create databases and manage their users.
Creating a database
- Log in to Plesk and open the Databases tab.
- Click Add Database.
- Enter a name for the database and select the subscription it belongs to.
- Leave Create a database user selected, and enter a user name and password — or generate a password.
- Click OK.
Note the database name, user name and password: you will need all three when installing your CMS. Plesk may add a prefix to the names you enter, so use the names exactly as they appear in the list afterwards.
Database users
Each database should have its own user with access to that database only. If one site is compromised, the damage is then limited to its own database rather than extending to every database on the subscription.
Users are managed on the same Databases tab, under User Management. There you can change a password, restrict which database a user may access, and remove users who are no longer needed.
Working with the contents of a database
Click phpMyAdmin next to the database (or phpPgAdmin for PostgreSQL) to open the database in your browser: you can view and edit tables, run queries, and import or export data.
For importing a large dump, uploading the file to the server and importing it from the command line is more reliable than uploading it through the browser, where the process may hit an upload size or execution time limit.
Connecting to a database from outside the server
Remote access is not open by default, and your CMS does not need it: applications on the same server connect through localhost. If you do need remote access — for example for a local database client — open a ticket from your client area and tell us which addresses need it, and we will advise on how best to arrange this securely.
Before you delete anything
Deleting a database is immediate and cannot be undone. Export the database first, even if you are certain it is no longer in use — an export takes seconds, and it is the only thing standing between a wrong click and lost data.