HostGator.com » Support Portal



Copy Entire Database or Rename Database

Is there a way for me to copy an entire database in cPanel?

Is there a way for me to copy an entire database from another server?

You will need to export the original database, and import to a new database.

How to export?
  1. Go to existing database in phpMyAdmin
  2. Click Export at the top
  3. Leave the settings as they are, click the "Save as file" checkbox and click Go
  4. This will download a .sql file to your computer

How can I import a database?
  1. Create a new database in cPanel
  2. Go to phpMyAdmin
  3. Click the new database name in the top left
  4. Click Import in the main area of phpMyAdmin
  5. Browse for the .sql file on your computer and click Go

Note: phpMyAdmin will timeout after 30 seconds of attempting to import.

If you experience this timeout, please upload the database backup file to your HostGator account and email support@hostgator.com with the details. Our administrators will perform the import for you. For security reasons, it's best to upload your database to the /home/USERNAME section of your account. (Replace USERNAME with your cPanel username.)


Is there a way to rename a database?

Unfortunately, the only way to rename a database is to copy it to a new, empty database with the desired name.


cPanelcPanel is a popular web hosting control panel that helps you manage your hosting account and assists you in creating web sites, managing e-mail addresses, & installing applications to a server.

cPanel is available on all HostGator Linux hosting plans, including Shared Hosting, Reseller Hosting, VPS and Linux Dedicated Servers.

Article Comments

Marcy Coate
Thank you. This was very helpful. I was able to transfer 2 large sites running on Joomla with no problems, thanks to your perfect explanations.

Ken
Great info, with more cms apps being used practical info like this for phpMyAdmin comes in very handy.

Gyalgin
I like to know if, the new database name is totally different from the old one, that can still be imported without any changes to it or need some changes
if need changes please let me know, what are the changes before i import it to new host.

HostGator
It can still be imported without making any changes to the name.

However, you will need to update your script's configuration file to reflect the new name.

Rahat
this is great.......thanks

Rahat
this is great...

thanks...........................

HostGator
Thank you for your comments. Just a quick reminder that the comments on this page are not monitored by technical support staff, and that for support issues, it is best to contact us by live chat, phone or email so we can assist you right away.

Although comments are not monitored by technical support staff, they are moderated and read by technical writers. Comments will need to be approved by a moderator before appearing.

Our technical writers do read the comments periodically for the purposes of updating the articles, and do appreciate your feedback, suggestions and corrections to the articles themselves, as well as any suggestions or tips for readers of this article. However, support questions posted here are not guaranteed to be replied to in a timely manner or at all. For support issues, it is best to contact our support staff instead by live chat, email or phone.



Your comments help us keep the knowledge base updated. This is not a medium for support. If you have questions or need help, please contact us via email, phone or live chat for fast assistance.

Post Comment