Transfer your WordPress or WooCommerce site to us, and we'll migrate everything for free! Details

Before you start

You need access to cPanel and a hosting plan that supports MySQL or MariaDB databases. Some applications create their database during installation; check the installer before creating one manually.

Create a database and user

  1. Sign in to cPanel and open MySQL Databases or the database-management tool provided by your host.
  2. Create a new database with a clear name.
  3. Create a database user and set a strong, unique password.
  4. Add the user to the database.
  5. Grant only the permissions the application requires. Many CMS installers ask for all privileges on that application's own database, but do not grant access to unrelated databases.
  6. Save the database name, username, password and database host in a secure password manager.

Your hosting panel may add an account prefix to the database and username. Use the full names shown in the panel.

Connect your application

Enter the database details in your application's setup screen or configuration. The database host is often localhost on shared hosting, but this is not universal; use the value supplied by your provider.

Do not place database passwords in public files, screenshots or support messages. If a password is exposed, change it and update the application's configuration.

If the connection fails

  • Check the full database and username, including any prefix.
  • Confirm that the user has been assigned to the correct database and has the required permissions.
  • Verify the database host and port with your provider.
  • Check the application's error log for the exact message.
  • Do not delete a database to troubleshoot unless you have a verified backup and understand the impact.

If the database tool is unavailable or an error persists, contact hosting support with the error text, but never include the database password.

Did not find your answer?

Write to us and we will help.