How to copy a table in phpMyAdmin
August 14, 2024
Backup of a table in the same database
This article will tell you how to make a copy of a table in phpMyAdmin. Usually, backups of databases and tables are saved to files, but let's consider a situation when you need to duplicate or clone data, structure and indexes of tables in the same or another database in the phpMyAdmin interface.
See also: How to copy a table in MySQL/MariaDB
Cloning a table is a convenient way to make a backup copy for the duration of the application development and debugging. If the application has damaged a table, it is very easy to delete and then restore the table from a backup, which is located in the same database.
For backup in case of a DBMS failure, of course, you need to save copies of tables and databases to files that should be stored on another medium.
How to make a copy of a table in phpMyAdmin in the same database
1. Go to the database whose table you want to copy.
2. Click on the name of the table you want to make a copy of.
3. In the top menu, click on the “Operations” button.
4. In the “Copy table to (database.table)” section, enter the name of the new table that will be created and into which the data from the source table will be copied.
Leave the settings unchanged, that is, the “Structure and data” option should be selected.
Then click the “Go” button.
The table has been successfully duplicated.
How to copy a table in phpMyAdmin to another database
1. If the database you want to copy the table to does not exist, then create it.
2. Go to the database whose table you want to copy.
3. Click on the name of the table you want to make a copy of.
4. In the top menu, click on the “Operations” button.
5. In the “Copy table to (database.table)” section, enter the name of the database where the table should be saved. You can keep the name of the source table or enter any other name.
Leave the settings unchanged, i.e. the option “Structure and data” should be selected.
Then click the “Go” button.
The table has been successfully duplicated.
Related articles:
- How to copy a table in MySQL/MariaDB (95.9%)
- “Failed - Network error” when exporting from phpMyAdmin (SOLVED) (65.1%)
- How to rename a table in phpMyAdmin and MySQL (65.1%)
- ERROR at line 1: Unknown command '\-'. (SOLVED) (65.1%)
- How to find rows with empty column value in MySQL/MariaDB table (in phpMyAdmin and in command line) (65.1%)
- How to prevent NetworkManager from managing a specific interface? (SOLVED) (RANDOM - 50%)