Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  How-Tos  >  How to copy a MySQL table with phpMyAdmin?
Top Scroll

How to copy a MySQL table with phpMyAdmin?

 2 min

This article will cover an easy step-by-step procedure on how to copy a table with phpMyAdmin located within the cPanel control panel.

Perform the following steps to do so :

1) Log into your cPanel account.

cPanel login page

2) Scroll down to Databases and click on phpMyAdmin.

cPanel phpMyAdmin

3) Select the Database and table that you wish to copy.

cPanel databases

cPanel database tables

4) Go to the Operations section.

cPanel operations

5) Locate box named ‘Copy table to (database, table).’

6) Select either option from ‘create a copy of the table’ to the current database (usually it is selected by default) OR ‘copy the table to a different database’.

7) Choose your database name from the drop-down box option and the name of the table to copy the structure and/or data into.

Choose from the following options before moving forward :

(i) Structure only :

This option creates a copy of the table and its name. Note that the option doesn’t copy data.

(ii) Structure and data :

This option allows you to copy the table along with its name, and also copies the data that it contains to the destination you choose further in the process i.e. INSERT INTO >> SELECT * FROM …..

(iii) Data only :

By clicking this radio button, you only would be able to copy the data to the destination.

cPanel operations details

After this, you will be asked to choose whether you wish to drop the table that you are copying to before creating the table and copying the data. This runs a DROP TABLE IF EXISTS query for the copy of the table and not the original one. It changes are not effective if you choose data only copy option.

Then you get an option to choose to copy the auto-increment value, make sure you need to do it manually. The auto-increment value gets end to whatever it is, once the INSERT INTO query is done. If you check the box then it would activate the CREATE TABLE syntax which includes the auto-increment value from the original table.

At the last, you will see the option that is termed as “Switch to copied table”, as the title suggests that you’d be switched over to the copied table once the queries are completed. In case you leave it unchecked, the resulting page will still look the same as the original table, and if it is checked then it will change to the copied database (if applicable) and table.

That’s it!

Also Read :

1) How To Create MySQL Tables In phpMyAdmin?

2) How to import MySQL tables using phpMyAdmin?

3) How to search MySQL tables in phpMyAdmin?

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.