ServerAvatarDocs
Databases

Manage a database

The page of one database, covering connection details, the application it is linked to, users, tables, import and export, its backups, and deletion.

Every database has its own page. Open it by clicking the database's name in the list on Databases. The heading carries the facts you usually want first: the name, the engine as a badge, the size and how long ago the database was created. Next to it are buttons for the browser clients Open in phpMyAdmin and Open in Adminer. If a client is not installed on the server, the button reads Install phpMyAdmin or Install Adminer and opens the create-application form with that application already chosen. Both are PHP applications, so a server that can't host PHP sites (for example MERN) shows no Install button.

The page has five tabs: Overview, Users, Tables, Import & export and Backups. The address carries the tab (?tab=users), so a tab can be linked.

If the engine is stopped, a notice at the top says MySQL isn't running, so nothing can connect to this database. Its size and tables can't be read until it's back. Check services opens Services.

Overview

The Overview tab holds what to connect with, the facts about the database, and the way to delete it.

The Overview tab of acme_reports with the Connection details card, the Details card showing Used by Not linked, and the Delete this database card

Connection details

The card shows the first user's connection:

  • A badge at the top right says where that user may connect from: This server only, an address, or Anywhere.
  • Connection string is the whole URL on one line, with Copy connection string. The password in it is hidden on screen.
  • Server holds Protocol, Host and Port. Credentials holds Database, Username and Password. Each has a copy button, and the copy button for the password copies the real value even though it is hidden.
  • If the database has more users, a line says so (2 more users can connect to this database. See the Users tab.).

The password is shown in full once only, in the dialog that appears when the database or the user is created. Roles without Database → Manage see Hidden — your role can't manage databases. instead of the password.

Details

The Details card shows Engine with its version, Users, Last export and Used by. Under it, one line states what Used by means for backups: Included in this application's backups. or Not linked to an application, so no backup includes it.

Used by decides which application's backups include this database. Backups run per application, so a database that is not linked is in no backup.

Click Attach to an application (or Change, if it is already linked) in the Details card. In the database list, click Not linked in the row.

Choose the application in Used by. Choose Not linked to an application to unlink it. Applications that already have a database are marked Already has a database, and applications that cannot use this engine say which engines they accept.

The Which application uses this database? dialog with the Used by field set to Not linked to an application

Click Save. The panel confirms with Database linked to the application. or Database is no longer linked to an application. The Save button stays disabled until you pick something different (Pick a different application first.).

Linking does not connect the application to the database. The application keeps using whatever its own configuration says.

Users

The Users tab lists who may sign in. Each row shows the user's name with a copy button, a badge for where it may connect from (This server only, the address, or Anywhere), and its connection string with the password hidden. A user named panel_… has a Panel account badge: it is the account the panel itself uses, and it cannot be changed or removed.

If the panel does not know a user's password, because the account came from another server, the row says so. Use Change password to set a new one and get a working connection string.

The Users tab with the row menu open on acme_reports_user showing Change password, Edit and Delete

Add a user

Add another user when something else needs access with a different reach: a reporting job on another host, or a migration tool you want to revoke later without disturbing the application.

Click Add user on the Users tab.

The Add a user to acme_reports dialog with a Username field and the three Where it can connect from options

Enter the Username and choose where it can connect from. The options are the same as in Create a database, with the same consequences. The username takes letters, numbers and underscores, up to 32 characters. The dialog says A strong password is generated for you and shown once the user is created.

Click Add user. A dialog shows the new user's connection details. Copy the password from it. It is not shown in full again.

Change a password, edit or delete a user

The ⋯ menu on a row, for roles with Manage access, has three entries:

  • Change password opens Change password for …. Enter the New password (at least 8 characters, up to 255) or click Generate. The new password replaces the old one at once, and anything still using the old password will stop connecting as soon as you save. The dialog then shows the New connection string.
  • Edit opens Edit …, where you can rename the user or change where it may connect from. The password is not changed here. Changing where it may connect from adds or removes the matching firewall rule. On MongoDB a rename creates the user again, so the password changes: the dialog asks for New password (required to rename on MongoDB).
  • Delete opens Remove …? and says the user will no longer be able to connect to the database, The database and its data are not touched. Click Remove user. For a panel_… user it is disabled (Cannot delete the panel account).

Tables

The Tables tab (Collections on MongoDB) shows what is inside the database: a summary such as 12 tables · about 17 rows, and a list with each table's name, Rows and Size. Filter tables… narrows the list, and Table, Rows and Size sort it.

The Tables tab of acme_blog_ccdi9d listing twelve WordPress tables with row counts and sizes

Row counts are the engine's own estimate, not an exact count. A new database shows No tables yet. until an application has run its installer. Under the list the panel states the Character set and Collation of the database. While the engine is stopped, the tab says Can't be read while MySQL isn't running.

The tab is for confirming that something landed. It does not edit tables: open the database in phpMyAdmin or Adminer for that.

Import and export

The Import & export tab has two cards: Exports first, because it is the safe, everyday action, and Import a file below it, because an import replaces the data.

The Import and export tab with a ready export of 495 B, its download and delete buttons, and the Import a file drop area for .sql or .sql.gz files

Export a database

Export now writes a copy of the database to this server. The row appears as Waiting, then Exporting, then Ready, with its age and size, a download button and a delete button. The list on Databases shows the newest finished export in Last export.

  • MySQL, MariaDB and PostgreSQL exports are gzipped SQL files (.sql.gz). MongoDB exports are .archive.gz files made with mongodump.
  • For a database larger than 512 MB, the panel first asks Export …? and shows the database size and how much disk is free, because the file is written to this server's disk and can take several minutes.
  • Only one export of a database runs at a time (An export of this database is already running…). Starting more than six a minute is refused.
  • The newest five exports are shown. Show all and Show less fold the rest.

An export on the same disk is not a backup

The panel says it under the list: These files are kept on this server, next to the database itself. Download a copy somewhere else — a file on the same disk will not survive a disk failure.

Nothing deletes exports for you either. The list shows 1 export kept here — 495 B. Nothing deletes these for you. Remove old ones with the delete button (Delete this export? → Delete export). For scheduled copies, set up backups from the Backups tab.

Import a file

An import replaces everything in the database with the contents of a dump file.

Make sure the database has a user that the panel can sign in as: one whose password the panel knows, and that may connect from this server (This server only or Anywhere). An import signs in as that user. Without one, the card says so and offers Open Users.

Drop a file on the card, or click Choose file. The accepted files depend on the engine:

EngineFiles
MySQL and MariaDB.sql or .sql.gz
PostgreSQL.sql, .sql.gz, or a pg_dump custom archive
MongoDBa mongodump --archive file, gzipped or not

A file larger than 2 GB is refused (The file is larger than the 2 GB an import accepts.), and so is one that would not fit in the free disk space. If the file name looks like a different engine's dump, the dialog warns This file looks like a PostgreSQL dump, but this is a MySQL database. The import will most likely fail.

Confirm. The dialog Replace everything in …? names the file. The switch Take a safety copy first (recommended) is on. With it, a backup of the database is taken first and put back automatically if the import fails. Turn it off and the dialog warns Without a safety copy, a failed import can't be undone. The database may be left empty or half-loaded. Click Replace database.

Watch the steps: Uploading, Checking the file, Backing up (only with a safety copy) and Importing. Keep the page open until the upload finishes (Cancel upload stops it). After that, the import continues on the server, so you can leave this page. If the import fails with a safety copy, the card shows Putting the backup back.

Imports are listed under Earlier imports as Imported or Failed, with who ran them. A failed row shows the reason, and an upload that stopped halfway says The upload did not finish. A file that finished uploading but was never started offers Start import. Each row has Delete, which removes the uploaded file and leaves the database alone. For an import that took a safety copy, the row has a download button, Download the backup taken before this import. The copy is kept in Exports as Automatic backup before import. Nothing deletes it, so remove old ones there to free disk space.

An import is refused while an export of the same database is running, and the other way round. Only one import runs at a time (An import is already in progress.).

Backups

The Backups tab shows how this database is backed up on its own.

The Backups tab of acme_reports with the notice This database is not backed up, a Set up backups button and an empty Recent backups card

  • A database that is linked to an application says Backed up with … and offers Open its backups, because its backups are set up on the application. When that application's backups don't include it, the tab says Not backed up with … instead: "That application's backups contain its files only. Change them to include the database." or "That application has no backups yet. Set them up and include the database." The Used by line on the Overview says the same ("Not backed up: this application's backups contain its files only.", "Not backed up: this application has no backups set up.").
  • A database that is not linked can have its own schedule. Until it has one, the tab says This database is not backed up (If the server is lost, so is this database.). Click Set up backups to choose how often it is backed up and where the copies go. Recent backups lists the newest runs, and All backups opens the full history.
  • Backups of deleted databases lists archived backups of the same engine that you can restore into this database with Restore here. Set up a schedule for this database first, because a copy of it is taken before the restore.

See Backups for schedules, storage and restores.

Delete a database

The red card Delete this database at the bottom of Overview removes the database, everything in it, and its users. It cannot be undone from inside the panel.

Take an export and download it, or make sure a backup exists.

Click Delete. The dialog Delete …? says This permanently deletes the database, everything in it, and the 1 user that connects to it. It can't be undone. If an application uses the database it adds … uses this database and will stop working once it is deleted. Backups of the database are kept: You'll find them under Backups → Archived, where you can download them or restore them into another database.

The Delete acme_reports? dialog with the warning text, the database name to copy and the box where it is typed, and the Delete database button

Type the database name in the box under Type this to confirm, then click Delete database.

Deleting a database does not delete the application that used it. To remove a whole site, delete the application from its own page and check the list afterwards for anything left behind.

Limits

  • Database user names: 1 to 32 letters, numbers and underscores. Passwords: 8 to 255 characters.
  • Import: up to 2 GB per file. The accepted size is a server setting.
  • Exports of a database: one at a time, at most six started a minute.

Who can do this

  • Database → View shows the page, the connection details with the password hidden, tables, the exports list and the backup state.
  • Database → Manage is needed for everything that changes something: users, the link to an application, export, import, download or delete of an export, phpMyAdmin and Adminer, and deletion. Downloading or deleting an archived backup also needs Backups → Manage.

Common errors

  • A database user named "…" already exists. Choose another name. Usernames are unique on the server.
  • "…" is the account the panel itself uses to manage databases. It cannot be changed or removed here. Leave the panel_… user alone.
  • An import runs as one of this database's own users, so it needs a user whose password the panel knows and who connects from this server (Local or Anywhere). Add one, or set a new password for an existing user.
  • There is not enough free disk space on this server for this file. Free some space in Disk Cleaner and try again.
  • An export of this database is running. Wait for it to finish, then start the import. (and the reverse).
  • MySQL is not answering, so the panel cannot read this database. Start MySQL on the Services page and try again.
  • This phpMyAdmin application has no HTTPS… or …shares the server-wide PHP pool… The one-click sign-in is refused until the client application has an SSL certificate and its own PHP pool. Open the client from its own address and sign in with the database credentials instead.
  • The panel does not know the password of the database user "…", because it was created outside the panel. Set a new password for it, then open Adminer again.

On this page