Skip to content

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.

Database and user names are always prefixed with the account’s system username:

account "example" + suffix "shop" → database example_shop
account "example" + suffix "app" → user example_app

You 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.

From Databases (pick the account) or the account workspace’s Databases section:

  1. Create database — enter the suffix.
  2. 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.

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.

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.

Opening a database from the list gives you a full manager with five views:

ViewWhat it does
OverviewSize, table count, engine and collation, at a glance
BrowsePaginated table data, sortable, with row add / edit / delete
StructureColumns, types, keys, indexes and CREATE TABLE; create and alter tables
SQLRun a statement against the database
ActivityLive 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.

Statements are parsed and classified before they run, and anything outside the allowed shapes is refused rather than passed through:

AllowedRefused
SELECT, SHOW, DESCRIBE, EXPLAIN SELECTAnything else — including WITH (CTEs)
INSERT, UPDATE, DELETE, REPLACESELECT … INTO, INTO OUTFILE, INTO DUMPFILE
CREATE, ALTER, DROP, TRUNCATE, RENAME on tablesCREATE/ALTER/DROP USER or ROLE
One statement per runMultiple 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.

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.

Standard MySQL connection settings:

SettingValue
Hostlocalhost
Database<user>_<suffix>, e.g. example_shop
Username<user>_<suffix>, e.g. example_app
PasswordThe one you set

For WordPress, installing through the WordPress Manager creates the database, the user and the credentials for you.

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.