Most software such as WordPress, OpenCart and PrestaShop stores its data in a MySQL / MariaDB database. To install such software, you first need to create a database and a database user.
Creating a database in Plesk
- Log in to Plesk and click Databases.
- Click Add Database.
- Enter the database name, the related website, a username and a password.
- Click OK.
Creating a database in cPanel
- Log in to cPanel and open Databases > Database Wizard.
- Type the database name and click Next Step.
- Set a username and password.
- Give the user ALL PRIVILEGES and finish.
In cPanel, your account name is added to the front of database and user names (for example account_wpdb). Write this full name in the configuration file.
Connection details
- Host:
localhost - Database name, username, password: the values you set when creating it
- Port: 3306
What can I do with phpMyAdmin?
Open it in Plesk under Databases > phpMyAdmin, and in cPanel under Databases > phpMyAdmin.
- Back up: Select the database and download it in SQL format from the Export tab.
- Restore: Select the database and upload the
.sqlfile from the Import tab. - Repair tables: Tick the tables and choose Repair table from the menu below.
Common error
The "Error establishing a database connection" error means the database name, username or password in the configuration file is wrong. Check the details; if needed, reset the user's password in the panel and write it to the configuration file.
