How to import and export a MySQL database

Plugins and mods · updated 28 November 2026

The database is not part of the server backup. If your plugins keep important data in it, such as LuckPerms ranks or CoreProtect logs, save it separately.

Importing and exporting a MySQL database as a .sql file in the PepeHost panel
The export, import and phpMyAdmin buttons above the database list

Export (back up the database)

  1. Open the Databases tab.
  2. Click Export database (SQL) for the database you want.
  3. Save the .sql file on your computer.

This file is a full copy of the database. You can load it back at any time.

Import (load a database)

  1. Create a database if you do not have one yet (how to do it).
  2. Stop the server so no plugin writes data during the import.
  3. Click Import database (SQL) and choose the .sql file.
  4. Start the server.
Warning: an import overwrites tables with the same names. If the database already has data, export it first.

Moving from another host

On your old host, export the database to a .sql file. In phpMyAdmin that is usually Export and then Go. Import it here as shown above, then change the connection details in your plugin configs to the new ones from the panel.

phpMyAdmin

Log in to phpMyAdmin opens the database in your browser. Use it when you want to look inside the tables or fix a single entry.

Frequently asked questions

The import fails with an error.

The file may come from a different MySQL version or be too large. Export it again without the CREATE DATABASE option. If it still fails, message us on Discord.

How often should I export?

Before every bigger change, for example before updating a plugin that uses the database.