With SWPanel you can use the phpMyAdmin tool to access the management of your databases, such as exporting or importing them.
You can also use any type of application for managing MySQL / MariaDB databases, such as HeidiSQL, which allows a much more powerful database management than phpMyAdmin.
In this manual we are going to learn how to import an SQL file using HeidiSQL. To do this, you must have the database previously downloaded. If you have never downloaded a database, we recommend following our manual on how to import and export databases with phpMyAdmin.
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 page, you must go to Downloads > Installer:
When you click on "Installer", go to the download page. The program may download automatically. If it doesn't download automatically, click on "Installer, 32/64 bit combined":
Open and run the downloaded file to access the program's setup and installation wizard.
Click on "I accept the agreement"> Next:
By default, the program will be installed in Windows Program Files, like all. If you want it to be installed elsewhere, select the folder using the "Browse..." button. Click on "Next":
This option creates a folder in the start menu, so that you can easily access the program. Click on "Next":
Here you can customize options and check or uncheck them as you wish. In order: create a desktop icon (recommended), associate SQL files with HeidiSQL (recommended, does not affect files and allows easier selection), check for updates automatically, and automatically report program bugs. Click on "Next":
The installation is now ready. Click on "Install" to finish the process:
Once the process is finished, click on "Finish". If you do not indicate otherwise, the program will open automaticall:
For this step, you need to have the database already created in your SW Panel. From SW Hosting we have a manual on Create a MySQL or MariaDB database.
⚠️In case of importing the database from an external provider, or from another service or SW Panel account, it is very important that the name, user and password of the Database that you have created for import the SQL file are identical to those corresponding to the old service provider. ⚠️
Open Heidi SQL. In the program you must enter the following information:
You should not modify the port, 3306, since it is the one that makes the connection to the database.
To know what is the name of the Host/IP of your database you must:
Type in the search engine of SW Panel the name of the service in which you want to modify the basic parameters and click on it:
Click on "Service servers", located in the blue side menu:
The IP found in "Assigned DB Server" is the one that you must use as "Host Name/IP" to access HeidiSQL:
Once the data has been entered in HeidiSQL, click on "Open":
Access the Database management:
Finally, upload the previously downloaded file.
Inside HeidiSQL, connected to the Database, go to ** "File"> "Load SQL file"**:
Look for the database previously downloaded in the wizard, select it and click on "Open":
It will indicate the size of the file and will give you the choice between Run the files directly or Load them in the editor. Click on "Run file directly":
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:
Once the file is uploaded, you can check that it has been uploaded properly, by disconnecting from the database in Heidi and reconnecting, or by closing in Heidi SQL and accessing the Database by phpMyAdmin from SW Panel.
To do this, press the disconnect button: