January 2018
Intermediate to advanced
446 pages
12h 57m
English
Suppose you want to restore data from the production database to a development machine that already has some data. If you want to merge the data from production with development, you can use the --replace option, which will use the REPLACE INTO statement instead of the INSERT statement. You should also include the --skip-add-drop-table option, which will not write a DROP TABLE statement to the dump file. If you have the same number of tables and structure, you can also include the --no-create-info option, which will skip the CREATE TABLE statement in the dump file:
shell> mysqldump --databases employees --skip-add-drop-table --no-create-info --replace > to_development.sql
If you have some extra tables in production, ...
Read now
Unlock full access