How to create a database in Plesk

Most CMSs need a database: WordPress, Joomla, OpenCart and others. By default, Plesk creates a MariaDB 10.5 database (MySQL-compatible). If your site needs Microsoft SQL Server, see MS SQL databases in Plesk.

Creating a database

  1. In the left menu, open Databases and click Add Database.
  2. Database name: the panel adds a prefix automatically (your username followed by an underscore). Type your own name after it, for example shop.
  3. Database server: keep the default server marked default for MariaDB.
  4. Related site: select the site the database belongs to (optional).
  5. Keep Create a database user selected and enter the Database user name and Password (or click Generate).
  6. Click Create Database.
The Add Database window
The Add Database window

The Database server list also includes MS SQL servers of several versions. Choose them only for sites that need MS SQL.

Connection details for your site

The new database appears in the list. The Connection info link shows the details for your site's configuration file:

SettingValue
Hostas shown in Connection info; for MariaDB, localhost:3306
Database namethe full name including the prefix
Userthe full database user name
Passwordthe password you set when creating the database
Database in the list: phpMyAdmin, Connection info, Export dump
Database in the list: phpMyAdmin, Connection info, Export dump

phpMyAdmin opens a web interface for working with tables. Import dump and Export dump load and save a dump: importing and exporting a database.

Common mistakes

  • The site configuration uses the database name without the prefix, which causes "Unknown database" or "Access denied" errors.
  • The user password is forgotten. Set a new one on the User Management tab: database users.
  • An MS SQL server was selected instead of MariaDB. PHP-based CMSs (WordPress, Joomla and others) work with MariaDB.
Questions and answers
The hosting uses MariaDB 10.5. It is MySQL-compatible, and CMSs work with it just as they do with MySQL.
Yes. Create additional users on the User Management tab of the Databases section.
Make a dump on the old host, create an empty database in Plesk and load the dump with Import dump.