Managing MySQL databases in Plesk is a straightforward way to handle the database layer of a website without using the command line. From creating a new database to adding a user, importing data, checking settings, and connecting an application, Plesk brings the most common database tasks into a single interface. This is especially useful in managed hosting environments where site owners, developers, and support teams need a reliable control panel workflow.
In this guide, you will learn how to create and manage MySQL databases in Plesk, connect them to a website, back them up, and troubleshoot common issues. The steps apply to standard Plesk hosting setups and are useful for WordPress, Joomla, Drupal, custom PHP applications, and other database-driven websites.
What you can do with MySQL databases in Plesk
Plesk provides a central place to manage MySQL databases and the users that access them. Depending on your hosting plan and server permissions, you can typically:
- Create new MySQL databases.
- Create and assign database users.
- Import and export database dumps.
- Change the database password.
- Remove databases that are no longer needed.
- View connection details for applications and scripts.
- Open phpMyAdmin for manual database management.
For most hosting customers, this is enough to install a CMS, restore a backup, or move a website from one hosting account to another.
Before you start
To manage MySQL databases in Plesk, you need access to the Plesk control panel and a hosting subscription or service plan that allows database creation. If you are on shared hosting, some options may be limited by the provider. In managed hosting environments, the hosting provider may also define the MySQL version, database limits, and available database tools.
It is also helpful to know:
- The domain name or subscription where the website is hosted.
- The application that will use the database, such as WordPress or a custom PHP script.
- Whether you need a new database or are restoring an existing one.
- The database name, username, and password you want to use.
How to create a MySQL database in Plesk
The process for creating a database in Plesk is usually quick and can be completed in a few steps.
Step 1: Open the Databases section
Log in to Plesk and open the subscription or domain where your website is hosted. Then go to Databases. In most versions of Plesk, this section lists all existing databases for the selected subscription.
Step 2: Add a new database
Click Add Database or a similar button. You will usually be asked to enter:
- Database name – the name of the MySQL database.
- Database server – if more than one database server is available.
- Related site or subscription – to associate the database with a domain.
- Database user – you can often create one at the same time.
- Password – for secure access.
Choose a strong password and keep it stored securely. For hosting security, avoid using simple passwords or reusing credentials from other services.
Step 3: Assign a user to the database
A MySQL database is usually accessed through a user account. In Plesk, you can either create a new user during the database setup or attach an existing user later. The user needs permissions on the specific database to read, write, and modify data.
Once created, Plesk will show the database name and user information in the Databases list.
How to connect a website or application to a MySQL database
After creating the database, you need to configure your website or application to use it. This is common when installing a CMS, restoring a site backup, or deploying a custom app.
Typical connection details
Your application will usually need the following values:
- Database name
- Database username
- Database password
- Database host
- Table prefix if required by the application
In many Plesk hosting setups, the database host is localhost. However, some hosting environments use a remote database server or a specific hostname provided by the host. If you are unsure, check the database details in Plesk or the hosting documentation.
Example: WordPress connection values
When setting up WordPress, the installer will ask for database details. In a typical Plesk environment, you would enter the values from your database setup and then complete the installation. If the credentials are correct, WordPress will connect to the MySQL database and create its tables automatically.
Example: Custom PHP applications
Custom PHP scripts usually store database credentials in a configuration file. In that file, update the database name, username, password, and host to match the values created in Plesk. If the app still cannot connect, verify that the user has the correct privileges and that the database server is reachable.
How to manage database users and permissions
MySQL users control access to your databases. In Plesk, user management is part of the database workflow and is essential for maintaining security.
Create a database user
If you did not create a user during database setup, you can usually create one from the database settings. Use a strong password and assign the user only to the database it needs.
Change a database user password
If a password is exposed, forgotten, or needs to be rotated for security reasons, you can change it in Plesk. After changing the password, remember to update the application configuration as well. If you do not update the application, the site will stop connecting to the database.
Review privileges
In many hosting accounts, the database user is granted full access to the assigned database. This is usually necessary for CMS platforms and most web apps. If your hosting setup offers privilege management, keep the permissions limited to what the site actually needs.
How to access MySQL databases with phpMyAdmin
Plesk commonly includes phpMyAdmin as a web-based database tool. It is useful for viewing tables, running SQL queries, exporting data, importing dumps, and troubleshooting application issues.
Open phpMyAdmin
From the Databases screen, click the phpMyAdmin link next to the database or open it through the database management tools available in Plesk. You will usually be logged in automatically or prompted for the database user credentials.
Common phpMyAdmin tasks
- Browse tables and records.
- Run SQL queries.
- Export a database backup.
- Import a database dump.
- Check table structure and indexes.
- Optimize or repair tables when needed.
phpMyAdmin is powerful, but it should be used carefully. Avoid deleting tables or changing data unless you know the impact on the application.
How to back up and export a MySQL database
Database backups are a critical part of hosting administration. Whether you are migrating a site, preparing for updates, or protecting against data loss, exporting a MySQL database should be part of your routine.
Export from Plesk
Depending on your Plesk version and permissions, you may be able to export the database directly from the Databases section. If that option is not available, use phpMyAdmin to export the database as an SQL file.
Recommended backup practices
- Store database backups outside the hosting account when possible.
- Keep more than one backup version.
- Test restores before relying on backups in production.
- Use a consistent naming scheme with dates and site names.
For larger websites, compression can make backups easier to download and store. If the database is large, consider restoring and exporting during low-traffic periods.
How to import or restore a MySQL database in Plesk
Importing a database is common during site migrations, staging deployments, and disaster recovery. Plesk supports database restoration through its interface or through phpMyAdmin.
Import a database dump
To import a database, select the target database and use the import function. Choose the SQL file or compressed dump file that contains your backup. After the import finishes, confirm that the tables and data appear correctly.
Restore after migration
If you moved a site from another host, the restore process usually includes:
- Creating a new MySQL database in Plesk.
- Importing the old database backup.
- Updating the application configuration with the new credentials.
- Testing the site in the browser.
If the application uses serialized data or hardcoded URLs, additional search-and-replace steps may be needed after migration.
How to rename or remove a database
Sometimes a database becomes unnecessary, such as after a site migration, a failed installation, or a project cleanup. In Plesk, database removal is usually simple, but it should be done carefully.
Deleting a database
Before deleting a database, make sure no active website or application uses it. Removing a database permanently deletes its data unless you have a backup.
Renaming a database
Some Plesk environments allow renaming or recreating a database under a new name. If your interface does not support direct renaming, the common workaround is to create a new database, import the backup, and then update the application configuration.
How to troubleshoot common MySQL issues in Plesk
Even in a managed hosting setup, database issues can happen. The good news is that most Plesk database problems are easy to diagnose.
1. Application cannot connect to the database
Check the following:
- The database name is correct.
- The username and password match the current credentials.
- The database host is set correctly, often localhost.
- The database user has permission to access the database.
- The MySQL service is running on the server.
2. Error establishing a database connection
This is common in WordPress and similar systems. It often means the configuration file contains the wrong credentials or the MySQL server is unavailable. Update the settings and test again.
3. Import fails or times out
Large SQL files may fail to import through the browser if the file exceeds hosting limits. In that case:
- Use a smaller compressed backup if possible.
- Split the database dump into smaller parts.
- Increase PHP limits if your hosting plan allows it.
- Ask support whether command-line import is available.
4. Database is missing tables
If the database exists but the app does not work correctly, the import may have been incomplete or the wrong database may have been connected. Verify the imported content in phpMyAdmin and compare it with the expected table structure.
5. Access denied for user
This usually means the database user was created but not linked properly to the database, or the password was changed without updating the application. Recheck the database user settings in Plesk.
Best practices for managing MySQL databases in a hosting environment
Good database administration helps improve security, reliability, and site performance.
- Use unique database credentials for each site.
- Keep database passwords strong and stored securely.
- Remove unused databases and users.
- Back up databases before major changes.
- Use phpMyAdmin carefully and only when needed.
- Monitor database size, especially on shared or limited hosting plans.
- Match the application’s database settings exactly, including prefixes and host values.
For managed hosting customers, it is also a good idea to document which site uses which database. This makes support requests and migrations much easier later.
MySQL database management tips for Plesk users
If you frequently work with databases in Plesk, these practical tips can save time:
- Keep a copy of the database credentials in your password manager.
- Use clear naming conventions for databases and users.
- Export a backup before installing plugins, themes, or updates that may alter the database.
- Verify that your application points to the right database after migration.
- Check the MySQL version if an older application has compatibility requirements.
If you manage multiple domains inside one hosting subscription, naming and organization become even more important. Clear labels help prevent connecting the wrong site to the wrong database.
FAQ
Can I create multiple MySQL databases in Plesk?
Yes, if your hosting plan or subscription limits allow it. The number of databases depends on your service plan and the limits set by the hosting provider.
What database host should I use in Plesk?
In many cases, the host is localhost. However, some setups use a remote database server or another host value. Check the database details in Plesk or your hosting documentation if you are unsure.
Can I use phpMyAdmin to edit data directly?
Yes, phpMyAdmin allows direct table and record editing. This is useful for advanced administration, but changes should be made carefully to avoid breaking the application.
Why does my site stop working after changing the database password?
Because the application configuration still contains the old password. Update the credentials in the website’s config file or installer settings after changing the password in Plesk.
How do I migrate a MySQL database to another Plesk server?
Usually by exporting the database from the old hosting account, creating a new database in the destination Plesk panel, importing the dump, and updating the application configuration to use the new credentials.
What should I do if my database import is too large?
Try importing a compressed file, splitting the dump into smaller parts, or using a more advanced import method if your hosting plan allows it. For very large databases, contact support for the best migration method.
Conclusion
Managing MySQL databases in Plesk is one of the most useful tasks in a hosting control panel. With a few clicks, you can create databases, assign users, connect applications, export backups, and restore content when needed. For site owners and developers working in a hosting environment, Plesk simplifies database administration while still providing enough flexibility for common web projects.
If you keep your credentials organized, back up your data regularly, and verify connection settings after each change, you will avoid most database-related issues. Whether you are launching a new site, migrating an existing one, or troubleshooting a connection error, the Databases section in Plesk gives you the tools to manage MySQL safely and efficiently.