Quick answer: Create the database and a dedicated user in your panel: cPanel MySQL Databases (or the wizard), CloudPanel site → Databases → Add Database, HestiaCP DB → Add Database, CyberPanel Databases → Create Database, aaPanel Database → Add database. Use one user per database with a strong generated password, and keep MySQL bound to localhost.

Overview

Nearly every dynamic site needs a MySQL/MariaDB database. The safe pattern is the same in every panel: one database + one dedicated user per application, least privileges, credentials stored only in the app config. Panels also bundle phpMyAdmin (or Adminer) for browsing data.

Before you start

  • A site/app that needs the database (you'll paste the credentials into its config).
  • A password manager or the panel's generator — never reuse the root/admin password.

Step-by-step guide

  1. Create the database in the panel (menu paths in the Quick answer). Prefixing (e.g. site1_wp) keeps multi-site servers tidy.
  2. Create a dedicated DB user with a strong password and grant it privileges only on that database.
  3. Note the host: with app and DB on the same server it is localhost (or 127.0.0.1).
  4. Put the database name, user, password and host into the app config (e.g. WordPress wp-config.php).
  5. Verify via the app installer or phpMyAdmin login as the new user.

Common issues

  • "Access denied" from the app: wrong user/password or the user has no privileges on that specific database.
  • App can't reach DB with host = IP: MySQL listens on localhost only (correct for security) — use localhost, don't open 3306 to the internet.
  • Import fails for a big dump: phpMyAdmin upload limits — import over SSH instead:
    mysql -u site1_user -p site1_wp < dump.sql
  • Collation mismatch on import: keep utf8mb4 everywhere unless the app requires otherwise.

When to contact support

If MariaDB/MySQL itself crashes, refuses to start, or the server is out of disk/RAM causing DB failures, open a support ticket; in-app credential issues are on the application side.

Frequently asked questions

Should each site have its own database user?

Yes. One dedicated user per database, with privileges only on that database, limits the damage if any single application is compromised — it is the standard safe pattern.

What host do I put in my app's DB settings?

With the app and database on the same server use localhost (or 127.0.0.1). Do not open MySQL's port 3306 to the internet just to use an IP — keep it bound locally.

How do I import a large SQL dump?

Skip phpMyAdmin's upload limits and import over SSH: "mysql -u user -p dbname < dump.sql". For multi-gigabyte dumps, run it inside screen or tmux so it survives disconnects.

Related articles

Need a hand? Contact Cloud2Y support →

Was this answer helpful? 0 Users Found This Useful (0 Votes)