Guides and tutorials

Hundreds of tutorials and step by step guides carefully written by our support team.

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.

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.png)
  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 SW Panel. 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 SW Panel 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 SW Panel 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 SW Panel.

Disconnecting the DB

To do this, press the disconnect button:

enter image description here

More than 2000 m² of own facilities and Data Centers in Spain
Your privacy is important for us
We use our own cookies for the proper functioning of the site. In addition, third-party cookies are used for analytical purposes only. This information is not associated with any person so that personal identifying data is not stored, but is only information that is collected to identify the session, with the aim of facilitating the analysis of the website. You can change your preferences at any time by entering this website again. For more information about our cookie policy you can visit our Cookies. You can press the "Accept and close" button to give us your consent or you can access more detailed information and manage cookies.
More than 2000 m² of own facilities and Data Centers in Spain
Your privacy is important for us
We use our own cookies for the proper functioning of the site. In addition, third-party cookies are used for analytical purposes only. This information is not associated with any person so that personal identifying data is not stored, but is only information that is collected to identify the session, with the aim of facilitating the analysis of the website. You can change your preferences at any time by entering this website again. For more information about our cookie policy you can visit our Cookies. You can press the "Accept and close" button to give us your consent or you can access more detailed information and manage cookies.