Plesk makes it easy to create MySQL databases and database users for your website or application. This guide covers creating databases, setting up database users, and managing access permissions.
Creating a Database
- Log in to Plesk.
- Go to Databases in the left navigation menu.
- Click Add Database.
- Fill in the required fields:
- Database name: Enter a name for the database (e.g.,
mywebsite_db). A prefix will be added automatically. - Related site: Select the domain this database is associated with (optional but recommended).
- Database server: Select the database server (usually MySQL or localhost).
- Database user: Create a new user for this database. Enter a username and a strong password.
- Access control: Choose whether this user can access all databases on the account or only this specific database.
- Character set: Select UTF-8 (utf8mb4) unless your application requires a different character set.
- Database name: Enter a name for the database (e.g.,
- Click OK to create the database and user.
Adding a User to an Existing Database
- Go to Databases.
- Click the database name you want to modify.
- Go to the Users tab.
- Click Add Database User.
- Enter the username and password.
- Click OK.
Viewing Database Connection Details
- Go to Databases.
- Click the database name.
- Click Connection Info.
- You will see:
- Host: The database server address (usually
localhost). - Port: The MySQL port (usually
3306). - Database name: The full database name (including prefix).
- Username: The full database username (including prefix).
- Host: The database server address (usually
Important Notes
- Plesk automatically adds a prefix to database names and usernames (based on your account).
- The number of databases you can create may be limited by your hosting plan.
- Always use utf8mb4 character set for modern applications to support all characters including emojis.
Troubleshooting
"Cannot create database — limit reached":
- Contact your hosting provider to increase your database limit or upgrade your plan.
Application cannot connect to the database:
- Verify the connection details in Databases → Connection Info.
- Ensure the database user has access to the correct database.