Importing and exporting a database
How to back up a database to an .sql file and restore it on a new server.
An export creates an .sql file with the structure and data. An import loads it into an empty or existing database, which is the main step when moving a site.
Export#
- Open Databases → phpMyAdmin and click the database in the left column.
- Click the Export tab.
- Leave Quick and the SQL format, then click Export.
- Your browser downloads an
.sqlfile. Keep it safe.
Import#
- First create an empty database and user: New MySQL database.
- In phpMyAdmin click the new database, then the Import tab.
- Click Choose File, select the
.sql(or.sql.zip/.sql.gz) and click Import. - When finished you see a green message and the tables appear in the left column.
Large databases#
If an import is interrupted by a size or time limit, compress the file (.zip or .gz) or send us a ticket and we will do the import for you. Limits depend on your plan.
You can also restore the whole account from a backup: Restoring from a backup.
Cet article vous a-t-il été utile ?
Merci pour votre retour ! Besoin d’aide ? Ouvrez un ticket.
Articles associés
Creating a new MySQL databaseHow to create a database and a user in cPanel and link them with the right privileges.phpMyAdminBrowse, edit and search database tables through a web interface.Restoring from a backupHow to restore files and a database from a backup and what to do if you need help.Remote MySQL accessHow to allow connections to your database from your computer or another server using Remote MySQL.
