Knowledgebase: Migration Guide
How do I migrate my database?
Posted by Alpha Daramy on 27 August 2008 06:00 PM

You can easily create a database dump (export/backup) of a databases used by your account. In order to do so you should access the phpMyAdmin interface available in the cPanel for your account:

phpMyAdmin

You will be brought through a redirect screen stating that the phpMyAdmin tool will be loaded shortly then the new page will be automatically loaded in your browser.

Once the phpMyAdmin tool loads, you can select the database that you would like to backup from the drop-down menu called Database (located in the upper left corner of your web browser).

phpMyAdmin - Choose a database

A new page will be loaded in phpMyAdmin for the database selected from the drop-down menu. In order to proceed with the backup click on the [Export tab]:

phpMyAdmin - Export

The options that is advisable to select apart from the default ones are Save as file (which will save the file locally to your computer in a .sql format) and Add DROP TABLE (which will add the drop if table already exists statement in the database backup) as shown below:

phpMyAdmin - Save as file

This is all that needs to be done and you can click the [Go] button to start the export/backup of your database:

Export/backup a MySQL database

A download window will popup prompting for the exact place where you would like to save the file on your local computer or automatically start the download depending on your local settings.

MySQL Import: How to restore your MySQL database from a backup

To restore (import) a database via phpMyAdmin, first choose the database you'll be restoring from the left menu. Then click the [Import tab]:

Importing a MySQL database via phpMyAdmin

You have the option of importing an .sql file. Use the [Browse] button to find it on your local computer. Note that you are given the option to choose the character set of the file from the drop down menu just below the box when the backup file will be specified. If you feel uncertain about the character set your database is using just leave the default one.

Importing an .sql file

In order to start the restore click the [Go] button in the bottom-right. A notification will be displayed upon successful database import.

(173 vote(s))
Helpful
Not helpful

Comments (0)