This guide shows you how to export a database (create a downloadable SQL backup) and import a database (restore or load data from an SQL file) using phpMyAdmin in your HOSTDOG control panel. Both operations take just a few clicks.

What you will need

  • An active HOSTDOG hosting account
  • Access to your hosting control panel (how to log in)
  • An existing MySQL database (how to create one)
  • For imports: an .sql or .sql.gz file (maximum upload size depends on your PHP settings, typically 50 MB)

Export a database (backup)

Step 1:
Open phpMyAdmin

Log in to your control panel, navigate to the Databases section, and click phpMyAdmin. This opens the phpMyAdmin interface in a new browser tab.

Step 2:
Select your database

In the left sidebar, click the name of the database you want to export. Make sure the database name is highlighted — the main panel shows its tables.

Step 3:
Export the database

Click the Export tab at the top. For most cases, the Quick export method with SQL format works perfectly. Click Go to download the .sql file to your computer.

Tip: For large databases, select the Custom export method and enable compression (gzip). This reduces the file size significantly and makes it easier to transfer or store.

Import a database (restore)

Step 4:
Select or create the target database

In phpMyAdmin, click the database where you want to import data. If you are restoring to a new database, create the database first, then select it in the sidebar.

Important: Importing into a database that already has data can overwrite existing tables. If you want a clean restore, drop (delete) the existing tables first, or import into a fresh empty database.
Step 5:
Import the SQL file

Click the Import tab at the top. Click Choose File and select your .sql or .sql.gz file. Leave the format set to SQL and the character set to utf-8. Click Go to start the import.

phpMyAdmin displays a success message once the import completes, along with the number of queries executed.

Importing large databases via SSH

phpMyAdmin has a file size limit for uploads (typically 50 MB). For larger databases, use the command line via SSH:

mysql -u yourusername_dbuser -p yourusername_dbname < backup.sql

For compressed files:

gunzip < backup.sql.gz | mysql -u yourusername_dbuser -p yourusername_dbname

Enter the database user password when prompted. This method handles files of any size and is significantly faster than the browser-based import.

Troubleshooting

Import fails with a file size error

phpMyAdmin's upload limit is controlled by PHP settings (upload_max_filesize and post_max_size). You can increase these through PHP INI settings, or compress your SQL file with gzip before uploading. For files over 50 MB, use the SSH command-line method described above.

Large imports can exceed PHP's maximum execution time. Try compressing the file (gzip), splitting it into smaller chunks, or using the SSH import method which has no timeout. You can also increase max_execution_time temporarily in your PHP settings.

The SQL file is trying to create tables that already exist. Before importing, select all tables in the database (Check All) and choose Drop from the dropdown to delete them. Then run the import again. Alternatively, if your SQL file uses CREATE TABLE IF NOT EXISTS, the import skips existing tables and may produce unexpected results — a clean drop-and-reimport is safer.

Need Help? If your database import fails or you need assistance migrating a large database, our support team is available 24/7. Navigate to the HOSTDOG homepage and click the Log in button to open a support ticket and we will assist you promptly.