· Tutorial ·

How to Import a SQL file into my Database in SWPanel with HeidiSQL

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 HeidiSQL, which allows a much more powerful database management than phpMyAdmin.

In this manual we are going to learn how to import a SQL file using HeidiSQL. To do this, you must have the database previously downloaded. If you have never downloaded a database before, we recommend you to follow our manual on how to import and export databases with phpMyAdmin.

If you want to install the HeidiSQL database manager on your private Cloud server with Windows 10 Pro operating system, you can have it at your disposal with a single click at SWHosting.

Your Cloud Windows 10 from $18.90/month

Get the most out of your project with the fastest disks and most powerful CPUs in the Cloud.

HeidiSQL download and installation

Download

From SW Hosting we never recommend downloading applications from untrusted sites. The best option is to download the program directly from the HeidiSQL official website.

Once you are on the official site, go to Downloads > Installer:

enter image description here

When you click on "Installer", go to the download page. The program may download automatically. If it does not download automatically, click on "Installer, 32/64 bit combined ":

enter image description here

Open and run the downloaded file to access the program setup and installation wizard.

Installation

Click on "I accept the agreement" > Next:

![enter image description here](https://static.swpanel.com/doc/2022/images/0236/0236_03.webp)
  1. By default, the program will be installed in Windows Program Files, like everyone else. *If you want it to be installed elsewhere, select the folder using the "Browse..." button. Click on "Next":

    enter image description here

  2. This option creates a folder in the start menu for easy access to the program. Click on "Next":

    enter image description here

  3. Here you can customize options and check or uncheck them as desired. In order: create a desktop icon (recommended), associate SQL files with HeidiSQL (recommended, does not affect the files and allows easier file selection), check for updates automatically and report program failures automatically. Click on "Next":

    enter image description here

  4. The installation is now ready. Click on "Install" to finish the process:

    enter image description here

  5. Once the process is finished, click on "Finish". If you do not indicate otherwise, the program will open automatically:

    enter image description here

Connection to the existing database with HeidiSQL

For this step, you need to have the database already created in your SWPanel. From SW Hosting we have a manual on Creating 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 the ones corresponding to the old service provider. ⚠️

Open Heidi SQL. In the program you will need to place the following information:

  1. Host/IP name: IP of the database server.
  2. User: Username of the database you have previously created.
  3. Password: Password to access the database that you have previously created.

You must not modify the port, 3306, since it is the one that makes the connection with the database.

enter image description here

To know what is the name of the Host/IP 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 must use as "Host Name/IP" to access HeidiSQL:

    enter image description here

Once you have entered the data in HeidiSQL, click on "Open":

enter image description here

Access the Database management:

enter image description here

Upload SQL file

Finally, upload the previously downloaded file.

  1. Inside HeidiSQL, connected to the Database, go to "File" > "Upload SQL file ":

    enter image description here

  2. Find the previously downloaded database in the wizard, select it and click on "Open ":

    enter image description here

  3. It will indicate the size of the file and give you the choice between Execute the files directly or Load them in the editor. Click on "Run file directly ":

    enter image description here

It is possible that the file is so small that the alert message does not appear, and it loads directly, or that you want to press the option "Load them in editor" instead of executing directly. If this is the case, once loaded, you must press the "play" button, so that the import of the SQL file to the database is executed:

enter image description here

Once the file is uploaded, you can check that it has been uploaded properly, either by disconnecting and connecting to the database in Heidi or by closing in Heidi SQL and accessing the Database via phpMyAdmin from SWPanel.

Disconnecting the DB

To do this, press the disconnect button:

enter image description here

Remember that you can install the HeidiSQL database manager on your own private Cloud server with Windows 10 Pro and located in the SWHosting data center.

Your Cloud Windows 10 from $18.90/month

Get the most out of your project with the fastest disks and most powerful CPUs in the Cloud.

i