Dump one record from mysql
Sometimes you want to copy one record from one database to another. For example, you find bug in production and want to reproduce it on your machine. You may dump buggy record from production database:
mysqldump -uremote_user -premote_password -hdatabase_host remote_database_name remote_table_name --where='id=1234' --skip-add-drop-table --no-create-info > ~/dump.sql
and insert it into you local database:
mysql -ulocal_user -plocal_password local_database_name < ~/dump.sql
Written by Alex Teut
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mysql
Authors
Related Tags
#mysql
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#