Being a DBA requires a rigorous working attitude.
Two test DB server A, server B, default storage engine InnoDB. There is a need to synchronize all the table structures in a to B. It was done at the time: Mysqldump-no-data ...
After exporting the files in the MySQL table, the results are applied to server A, and it is conceivable that the data in a is emptied. Because is the test db, the data quantity is not big, uses the backup +binlog to be able to recover completely. But be cautious, come to the first summary: for the newly added table or modify the table structure, to apply to other db, it is best to use the--skip-add-drop-table (ning the original repeating table error, do not produce delete data)
At this time we another enthusiastic long classmate, will MySQL restart. A binlog log file was missing. At the time, I thought that the data would be lost part. The reason for the loss of the Binlog log is that Expire_logs_days was set up (Binlog will be deleted as soon as no changes are made). This leads to a second summary: Because the setting expire_logs_days cannot determine the specific date of the file deletion, the purge binary logs method is manually deleted. For the situation of master-slave copying on line, it should be so, the original set of expire_logs_days=15 (need to check the specific location of each slave application Binlog)
When Binlog is applied to DB, the error of duplicate key is interrupted. This is caused by the fact that a field in the original table is only a normal index and then a non unique index. There is no way to manually modify the files parsed from the Binlog. The third conclusion is that in order to prevent errors in recovering data after schema changes, you can consider flush logs once a day. Reduce the range to a minimum. Mysqlbinlog parsing can be done in a single file. You can use the Confluence tool to make a real-time update of the changes to the table. Have a good grasp of their own db.
Finally, we need to sum up, attitude is very important to form a good standard.
This column more highlights: http://www.bianceng.cn/database/MySQL/