Copy of InnoDB InnoDB table from one server to another server

Source: Internet
Author: User

Copy a table of type InnoDB from one server to another, or copy from one library to another.

The premise is: Innodb_file_per_table =on.

1 Create an identical table structure on the destination server (library) first.

Such as:

2 discarding the existing table space

3 on the source server (library), perform the flush*** for export operation to persist the cached data in buffer pool to the hard disk and generate a. cfg file.

4. The. cfg file and the. ibd file are in the target server (library).

The direct CP command is OK.

5 on the source server (library), perform UNLOCK TABLES to release the locked table "flush TABLES * * * for export"

6 on the destination server (library), Import tablespace for table space

As above, as I reported above, please modify the. cfg and. ibd file operation permissions for MySQL.

This makes it possible to quickly copy and transfer large table data.

Partitioning is handled in the same way as above.

    

Copy of InnoDB InnoDB table from one server to another server

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.