Environment: Rehl 6.2 + MySQL 5.6.12
Scenario: When using MySQL's replicatio technology, sometimes because of an extension, sometimes because some of the master standby is hung up, we often need to replicate an identical database and then re-establish the master-slave relationship.
Here is a method for full migration of data with large amount of data:
first of all: In the process of data migration can no longer be inserted, or there will always be possible to produce different data.
This is considered and is aimed at the situation of large data volume (pro-test situation: Five large tables are above 30 million data, the total data is about 40G, the migration time of one hours or so)
1) Configure the original database so that it generates a log file name that is not related to its machine name.
2) Close the database
3) Full copy of database files (note the integrity of ibdata1, IB_LOGFILE0, ib_logfile1 files. )
4) Start the database after migration
5) Establish a primary and standby association
MySQL Full-scale migration