[MySQL] Backing Up A Small MySQL Table

1) This method only works on base tables and not views, so firstly we navigate to the correct schema, and output the list of tables and views:

use YOURSCHEMA;
show full tables;

2) Then to view and backup the table, and verify the backup:

select * from YOURTABLE;
create table YOURTABLE_BACKUP like YOURTABLE;
insert into YOURTABLE_BACKUP select * from YOURTABLE;
select * from YOURTABLE_BACKUP;

Simples!


Comments