MySQL single table import data, full-scale backup import single table

Source: Internet
Author: User
Tags prepare

(1) The Export Table Export table is in the prepare phase of the backup, so once the full backup is complete, you can export a table through the--export option during the prepare process: Innobackupex--apply-log--export/ backup/xbackup/full/  #这个需要在备份的目录下面执行.  The following path is the directory of the backup. (important) is not a directory of your own definition. # Innobackupex--apply-log--export/path/to/backupinnobackupex--apply-log--export/ Backup This command creates a file that ends with. exp for each table space in the InnoDB table, and these files that end with. Exp can be used to import to other servers. (2) "Import" table to import a InnoDB table from another server on the MySQL server, you need to create a table on the current server that is consistent with the original table structure before you can import the table into the:mysql> CREATE table MyTable (...)  Engine=innodb; #这里要新建表结构 #create table test (ID int,name varchar (), age int) Engine=innodb; #mysql > Show variables like '%autocommit% '; then delete the table space for this table:mysql> ALTER table mydatabase.mytable  DISCARD tablespace; Next, it will come from the "export" The table's MyTable table's mytable.ibd and Mytable.exp files are copied to the current server's data directory and then "imported" using the following command: (remember to change permissions) It's important to change permissions here mysql> ALTER TABLE Mydatabase.mytable  IMPORT tablespace;

MySQL single table import data, full-scale backup import single table

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.