· Tutorial ·

How to Import or Export a Database in SWPanel with MySQL Workbench

With SWPanel you can use the phpMyAdmin tool to access the management of your databases, such as exporting or importing them.

Also, you can use any kind of MySQL/MariaDB database management application, such as MySQL Workbench, which allows a much more powerful database management than phpMyAdmin.

In this manual we are going to learn how to export and import a SQL file using MySQL Workbench.

Preparing the environment

First of all, it is advisable to have the database already created in your SWPanel. From SW Hosting you have a manual on Create a MySQL or MariaDB database.

⚠️In case of importing the database from an external provider or from another SWPanel service or account, it is very important that the name, user and password of the Database you have created to import the SQL file are identical to those corresponding to the old service provider.. ⚠️

You will also need to know the following information:

  1. Host Name/IP: IP of the database server.
  2. User: Username of the database you have previously created.
  3. Password: Access key to the database that you have previously created.
    1. Port: 3306(usually)

To find out what is the Host/IP name of your database you must:

1.Type in the SWPanel search engine the name of the service in which you want to modify the basic parameters and click on it: enter image description here

2.Click on "Service Servers", located in the blue side menu: enter image description here

3.The IP found in "Assigned DB Server", is the one you should use as "Host Name/IP": enter image description here

Once you have all the data, we can move on to the next step.


To make the connection, you must open the MySQL Workbench program and create a new connection. You can do this by going to "Database" --> "Manage Connections...". Or by clicking on the "+" icon:

enter image description here

2.Next, you must enter the data previously collected and then click on "ok":

Connection name: Name you want to give to the connection.

Hostname: IP address of the database server

Port: 3306

Username: User name of the database you have previously created

enter image description here

3.Finally, you must click on the new box that will appear with the connection name. It will ask you for a "password", this corresponds to the access key to the database you have previously created: enter image description here

Exporting data

You can use the "Data export" panel to export MySQL data.

1.In MySQL Workbench, in the "Navigator " panel, select "Data export".

2.In the "Data export" panel, select each database you want to export.

3.For each database, you can select specific tables to export.

4.Select the destination folder for the export of an .sql file.

5.Select "Start Export" to start the export process.

enter image description here

#Importing data

You can use the Data Import/Restore panel to import or restore the data exported with the data export operation.

1.In MySQL Workbench, in the "Navigator " pane, select "Data Import/Restore".

In the """Data Import/Restore**" pane, select the .sql file that you want to import.

3.Select the specific database into which the data will be imported.

4.Select "Start import" to start the import process.

enter image description here

Logging out

To exit the connection, click on the small "x" on the right side of the connection name located in the upper left corner of the MySQL Workbench window:

enter image description here