Skip to main content

Question

How can I quickly recreate a table and its data using just copy/paste across different terminals?

Answer

This is NOT a recommended practice to migrate data from one database to another and it should NOT be used for production data migration. This is simply intended as a quick and dirty way to recreate small amount of data when developing across multiple environments.
  1. Get the CREATE TABLE statement with SHOW CREATE table:
  1. Get the data export using FORMAT SQLInsert
Note you will need to replace the name table at point 2 with the actual table name (cookies in this example)
Last modified on June 29, 2026