BuycPanel Blog

BuycPanel Blog

Latest news and updates

Import a MySQL Database from the Server in cPanel

Posted by Jamison on 19 11 2015.

There are many reasons why you would want to import your MySQL database from the server. For instance, database migration is necessary as your account runs out of disk space and your server becomes obsolete. The same process is required if you need to take your business elsewhere as your current hosting provider increasingly becomes unpredictable and undependable. All in all, importing your MySQL files can ensure that your sites or databases are running smoothly.

 

The most efficient way of migrating your database is to use the MySQL command line to process your database import or export. But it’s the most difficult method. There are two easier ways to move your MySQL databases. Here they are:

 

Method 1. phpMyAdmin via cPanel

 

phpMyAdmin is a PHP-based software tool designed to handle MySQL over the web. If you have a hosting provider or you have your own server, then you must already have it installed…

There are many reasons why you would want to import your MySQL database from the server. For instance, database migration is necessary as your account runs out of disk space and your server becomes obsolete. The same process is required if you need to take your business elsewhere as your current hosting provider increasingly becomes unpredictable and undependable. All in all, importing your MySQL files can ensure that your sites or databases are running smoothly.

 

The most efficient way of migrating your database is to use the MySQL command line to process your database import or export. But it’s the most difficult method. There are two easier ways to move your MySQL databases. Here they are:

 

Method 1. phpMyAdmin via cPanel

 

phpMyAdmin is a PHP-based software tool designed to handle MySQL over the web. If you have a hosting provider or you have your own server, then you must already have it installed in your system. To use phpMyAdmin when migrating your databases, simply access the Databases section on cPanel. Here are the steps involved:

 

  1. On the old server, select and click on the left panel the database that you want to export.
  2. Next, click on Export tab on the upper part of the screen.
  3. Save the database to a file.
  4. On the new server, select and click on the left panel the database that you want to import.
  5. Next, click the Import tab.
  6. Choose the file that you have just saved in Steps 1 to 3.
  7. When the process is completed, you’re migration is done.

 

This method is not without limitations. For one, you need to have phpMyAdmin installed on both the old and new servers for this method to work. The size of the database you can migrate must be below 50MB. Plus, you must ensure that the export file size also fits within the upload limits. Use this method if you have relatively small databases, such as that of a WordPress site. Otherwise, you may risk having partial or broken migration of files if you move huge databases.

 

Method 2. MySQL Workbench

 

If you don’t have phpMyAdmin or the size of the database that you’re moving is large, you can use this graphical user interface (GUI) tool that comes direct from MySQL. More than database migration, MySQL Workbench can also monitor the health of your servers and it comes with SQL data modeling. Here are the steps:

 

  1. Establish Server Instance for both the old and new servers.
  2. Access the Server Admin tool of the source server.
  3. Click Data Export on the left panel of the screen.
  4. Select and click on the database that will be exported.
  5. Configure your options.
  6. Click Start Export to save the exported files on your computer.
  7. On the new or destination server, start a fresh Server Admin connection.
  8. Click Data Import/Restore on the left panel.
  9. On your local computer, click the database you want to import.
  10. Click Start Import and wait for the process to finish. You’re done.