Skip to main content

How to quickly recreate a small table across different terminals

Learn how to quickly recreate a small table and its data across different terminals using copy/paste for development environments.

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)

· 2 min read