How to import a database from the Hostinger dashboard

Upload a .sql or .sql.gz file in the Hostinger dashboard to create and import a new MySQL database.

Updated 7 days ago

Import a database from the Hostinger dashboard by uploading a .sql or .sql.gz file in Databases → Management. Hostinger creates a new MySQL database and database user for the file and imports your data into it. When the import finishes, save the login details and update your website’s configuration file.

Before you start

Import a database file from the Hostinger dashboard

Use the Import database button in Databases → Management to upload your file. Hostinger creates the database and user automatically, so you don’t need to create a new MySQL database first.

  1. Go to Websites → Manage site. Then, select Databases → Management in the left sidebar.
  2. Select Import database next to List of Current MySQL Databases And Users.
  3. Drag and drop your .sql or .sql.gz file into the Import a database window, or select Choose file.
  4. Wait for the file to upload. Keep Delete the .sql file after import selected to remove the uploaded file from your files after the import. Clear the checkbox to keep the file.
  5. Select Import. Hostinger uploads the file, creates the database and user, and imports the data. The window shows the progress of each stage.
  6. Keep the page open until the import finishes to get the login details.
  7. Copy the Database name, Username, and Password from the Your database is ready window. Then, select Done.

The database password appears only once, when the import finishes. Save it before closing the window. You can change the database password later in the database list.

To check the imported tables, select Enter phpMyAdmin in the Your database is ready window. Learn more about how to access phpMyAdmin at Hostinger.

Connect your website to the imported MySQL database

The new database appears in the MySQL database list with a New label. It is assigned to the website you imported it from.

Update your website’s configuration file with the new database name, username, and password. The steps depend on your content management system (CMS). Find these values later in your MySQL database details.

If your website shows a database connection error after the update, follow How to fix “Error establishing a database connection” at Hostinger.

Your database is now imported and ready to connect to your website. For the full process of moving a database to Hostinger, see How to upload and set up your database at Hostinger.

NOTES