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
.sqlor.sql.gzfile (maximum upload size depends on your PHP settings, typically 50 MB)
Export a database (backup)
Log in to your control panel, navigate to the Databases section, and click phpMyAdmin. This opens the phpMyAdmin interface in a new browser tab.
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.
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.
Import a database (restore)
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.
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
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.