How to export and import a database with phpMyAdmin

Exporting a database gives you a copy of its contents as a single file. You can keep it as a backup or use it to move your site. Importing puts a copy back.

Steps

If your cPanel uses the Jupiter theme

  1. Log in to cPanel and open Databases > phpMyAdmin.
  2. Click your database name in the left panel.
  3. To export, click the Export tab. Choose Quick and the format SQL, then click Export. Your browser downloads a file ending in .sql.
  4. To import, click the Import tab. Under File to import, click Choose File and select your .sql file.
  5. Leave the other settings as they are and click Import. A green message appears when it is finished.

If your cPanel uses the Meridian theme

  1. Log in to cPanel and click Databases in the left sidebar.
  2. Click Manage next to the database, open the Advanced tab, and click Open phpMyAdmin.
  3. Click your database name in the left panel.
  4. To export, click the Export tab. Choose Quick and the format SQL, then click Export. Your browser downloads a file ending in .sql.
  5. To import, click the Import tab. Under File to import, click Choose File and select your .sql file.
  6. Leave the other settings as they are and click Import. A green message appears when it is finished.

Why export a database

An export is the safest way to take a snapshot before you make changes to your site. It is also what you need when you move a website to a new host or restore it after a problem. The .sql file is plain text, so it is not very large for most small sites, and you can keep several dated copies on your computer.

Tips and troubleshooting

  • Import into an empty database or one you are happy to overwrite. Existing tables with the same names may be replaced.
  • Large files may not upload through your browser. If you get a size error, contact support.
  • You can also back up and restore databases with the Backup Wizard in Files > Backup Wizard, if it is available on your plan.
  • Keep a copy of every export somewhere that is not the server, such as your computer.
  • Before you import, make sure the database name and user in your site's settings match.
  • If the import stops with an error, note the error text and send it to support.

Need help? Contact Barrett IT Support at support@barrettit.com or call 888.374.4632.

  • 0 A felhasználók hasznosnak találták ezt
Hasznosnak találta ezt a választ?

Kapcsolódó cikkek

How to create a MySQL database and user

Many websites and apps, such as WordPress, store their content in a database. If you are...

How to use phpMyAdmin to view and edit your database

phpMyAdmin is a tool for looking inside your databases. Most clients never need it, but support...