MySQL Databases
CorePanel manages MySQL/MariaDB databases per account: the account owns its databases, its database users, and the limit on how many it may create. A built-in database manager lets you work with the data without installing phpMyAdmin.
Naming: everything is prefixed
Section titled “Naming: everything is prefixed”Database and user names are always prefixed with the account’s system username:
account "example" + suffix "shop" → database example_shopaccount "example" + suffix "app" → user example_appYou type the suffix; CorePanel builds the full name. This is what keeps two accounts from colliding on a shared MySQL server, and it means a name you see in a config file tells you which account owns it.
Suffixes may contain letters, digits and underscores. The full name is limited by MySQL: 64 characters for a database, 32 for a user — the prefix counts.
Creating a database
Section titled “Creating a database”From Databases (pick the account) or the account workspace’s Databases section:
- Create database — enter the suffix.
- Create user — enter a suffix, a password, the host and the privileges.
A database with no user is not reachable by an application; a user is created against a database and granted privileges on it.
Users and hosts
Section titled “Users and hosts”A MySQL user is identified by name plus host. The host defaults to localhost, which
is what an application running on this same server needs. The same suffix can exist for
different hosts, but not twice for the same one.
Privileges are chosen when the user is created and can be changed afterwards, along with the password.
Limits
Section titled “Limits”Database creation is capped by the account’s MySQL databases limit (0 = unlimited).
When the limit is reached, creation is refused until a database is deleted or the limit
raised.
The database manager
Section titled “The database manager”Opening a database from the list gives you a full manager with five views:
| View | What it does |
|---|---|
| Overview | Size, table count, engine and collation, at a glance |
| Browse | Paginated table data, sortable, with row add / edit / delete |
| Structure | Columns, types, keys, indexes and CREATE TABLE; create and alter tables |
| SQL | Run a statement against the database |
| Activity | Live process list, with the ability to kill a query |
Editing rows requires a primary key on the table — without one there is no safe way to address a single row, so the manager offers reading only.
The SQL console is deliberately narrow
Section titled “The SQL console is deliberately narrow”Statements are parsed and classified before they run, and anything outside the allowed shapes is refused rather than passed through:
| Allowed | Refused |
|---|---|
SELECT, SHOW, DESCRIBE, EXPLAIN SELECT | Anything else — including WITH (CTEs) |
INSERT, UPDATE, DELETE, REPLACE | SELECT … INTO, INTO OUTFILE, INTO DUMPFILE |
CREATE, ALTER, DROP, TRUNCATE, RENAME on tables | CREATE/ALTER/DROP USER or ROLE |
| One statement per run | Multiple statements in one run; executable version comments (/*! … */) |
Statements are also capped at 8 KB. Write statements are recorded in the audit log; reads are not.
Activity
Section titled “Activity”The Activity view shows what MySQL is doing right now and lets you kill a runaway query — the first thing to look at when a site becomes slow and you suspect the database rather than PHP.
Connecting from an application
Section titled “Connecting from an application”Standard MySQL connection settings:
| Setting | Value |
|---|---|
| Host | localhost |
| Database | <user>_<suffix>, e.g. example_shop |
| Username | <user>_<suffix>, e.g. example_app |
| Password | The one you set |
For WordPress, installing through the WordPress Manager creates the database, the user and the credentials for you.
Deleting
Section titled “Deleting”Deleting a database drops it from MySQL along with its users, and frees the account’s counter. Deleting an account drops all of its databases and users from the MySQL server, not just CorePanel’s records of them.