1. Home
  2. Migration Process
  3. Migration Preparation
  4. How do I restore a MySQL from database dump?

How do I restore a MySQL from database dump?

Restoring a MySQL database from a dump file brings your store’s data back onto a server, whether you’re setting up a fresh environment or migrating from a backup. Here are two common ways to do it:

Option 1: Using phpMyAdmin (recommended for most users)

1. Log in to your hosting control panel (such as cPanel) and open phpMyAdmin.
2. If you don’t already have a database set up, create a new one first.
3. Select the target database from the left-hand menu.
4. Click the Import tab at the top.
5. Click Choose File and select your database dump file (usually a .sql file).
6. Scroll down and click Go to start the import.
7. Wait for the confirmation message once the import completes.

Option 2: Using the command line (for advanced users)

1. Upload your database dump file to your server via FTP or SSH.
2. Create a new database if needed, using a command like:

mysql -u your_username -p -e "CREATE DATABASE your_database_name;"

3. Restore the dump into that database with:

mysql -u your_username -p your_database_name < your_dump_file.sql

4. Enter your MySQL password when prompted, and wait for the process to complete.

Once restored, double-check that your store connects properly to the newly restored database, and that your data appears as expected.

If you have other questions or inquiries, please contact our Support Agents via live chat or email us at [email protected].

Was this article helpful to you? No Yes

How can we help?