Create a copy of MySQL Database using phpMyAdmin

Sometimes it requires to quickly create a clone of the MySQL database while working on the project either for the backup purpose, using it on a copy of the project or moving the project.

With phpMyAdmin, this process is easier.

In this tutorial, I am assuming that you already have a cPanel enabled web hosting server.

Create a copy of MySQL database using phpMyAdmin


Contents

  1. Directly from phpMyAdmin
  2. Export and Import
  3. Conclusion

 


 

1. Directly from phpMyAdmin

  • Login to your cPanel and open phpMyAdmin.

Create a copy of MySQL database using phpMyAdmin

  • Select the database which you want to create a copy.
  • Click on the Operations.
  • Now enter the new database name in Copy database to section and set the radio button to Structure and data.

Create a copy of MySQL database using phpMyAdmin

  • Click on the Go button.
  • A new database is been created.

Create a copy of MySQL database using phpMyAdmin


 

2. Export and Import

There are following steps –

Export Database

  • Open phpMyAdmin.
  • Select your Database which you want to create a clone of.
  • Click on the Export and select the format to SQL and click on the Go button.

  • Now need to create a new MySQL database for data import.

Create Database

  • Navigate to your cPanel home and click on MySQL databases under Databases.

Create a copy of MySQL database using phpMyAdmin

  • Enter the name of the database and click on the Create Database button.

Create a copy of MySQL database using phpMyAdmin

Create a User

  • Navigate to Add New User Section.
  • Enter the username and password and click on the Create User button.

Create a copy of MySQL database using phpMyAdmin

Assign user to database

  • Navigate to Add User To Database.
  • Here, select your created user and Database from the drop-down.

Create a copy of MySQL database using phpMyAdmin

 

  • Click on the Add button.
  • You will be taken to the Manage User Privilege section. Here, check the All Privileges checkbox and click on Make Changes button.

Create a copy of MySQL database using phpMyAdmin

Import SQL file

  • Open phpMyAdmin and select the newly created database.
  • Click on the Import.
  • Choose the exported SQL file and click on the Go button.

  • You will see a success message after successfully importing.

 

3. Conclusion

Follow the any of the above methods to create the duplicate of the selected MySQL database either on the server or local system.

Share this article with your friends and social media if you find this useful.

Related Post

Spread the love

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *