Skip to content

MariaDB. Importing data into a database

Importing loads the contents of an .sql file — a dump produced by exporting another database — into a database. In BeAdmin, importing only works into an empty database: this protects against accidentally overwriting existing data. To import into a non-empty database, use phpMyAdmin (if it is installed in the MariaDB module).

Before you start, make sure you have a dump and a database it will be loaded into. For how to create a database, see MariaDB Quick start.

Step 1. Preparing the dump

A dump is a plain text file with the .sql extension. The output of mysqldump, an export from phpMyAdmin on another server, an export from a CMS — any source that produces a standard SQL dump will do.

⚠️ Dump without CREATE DATABASE

The dump must contain only the tables and the data inside the database — without CREATE DATABASE or USE instructions. You pick the database at the import step; if the dump tries to create the database itself, the import will fail with an error. If such lines are in the file, remove them before uploading.

Step 2. Uploading the dump to the server

The module imports files that lie on the server's filesystem, so the dump must first be placed there. We recommend one of the following ways:

Via the file manager

In the side menu, open Files, navigate to the desired directory and click "Upload". Pick the .sql file on your computer and confirm the upload.

Via FTPS

Direct SSH/SCP access to the server from the panel is not provided. To transfer files from your local machine, enable FTPS via the "Enable FTP" button in the file manager and connect with any FTP client (the same login and password as for the panel). The FTP root is /home/www; place the dump in the appropriate subdirectory. For details, see the guide on connecting to the server via FTP.

Step 3. Running the import

In BeAdmin, the import can be started from the MariaDB module or directly from the file manager. Both paths lead to the same dialog and the same result — pick whichever is more convenient.

From the MariaDB module

  1. Open the MariaDB module and switch to the "Databases" tab.
  2. In the row of the database you need, click the icon with the "Import data" tooltip. If the database does not exist yet, create it via the "Create database" button on the same tab.
  3. In the "Import data" dialog, fill in the fields:
    • "Database" — a dropdown with empty databases on the server. Databases that contain tables are not shown in the list.
    • "Dump file" — a dropdown with the .sql files found on the server. If there are none, the "No .sql files found, upload them to the server" message appears — go back to step 2.
  4. Click "Run".

Via the file manager

In the Files section, find the uploaded dump, right-click it and pick "Import into database". The same import dialog opens with the file already filled in — all that is left is to pick the database and click "Run".

After the run, the data appears in the selected database. You can check the tables and records via phpMyAdmin or directly from the application that works with this database.

BeAdmin © 2025. All rights reserved.