MySQL Full-scale migration

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.