mysql5.7 InnoDB data table spatial file Smooth migration

Source: Internet
Author: User


[ERROR] [FATAL] Innodb:tablespace ID is in the data dictionary and in file./MYSQL/INNODB_INDEX_STATS.IBD It's 696!


--Test directly copy the. ibd file in the past (this method fails because tablespace_id is inconsistent)


Mysqld_safe--defaults-file=/usr/my-new.cnf &--Qicu


Summarize:

For InnoDB each table has its own tablespace, if only the. ibd file (and of course the table's definition statement). You can restore the data by creating a new table in the library, and then discard+import the old. ibd file.

In 5.6 can not tube tablespace_id inconsistent, the original version, but also need to manually tablespace_id to the same (two methods, 1 manual build table or change the table name 2 to VI. ibd File http://www.linuxidc.com/ linux/2012-02/54122.htm)


InnoDB data table space files for smooth migration


But I think it's best to use Ibbackup to fix it. Online db, whether the shared table space can be done.


Sure, Ibbackup is easier to fix, but know that Ibbackup belongs to commercial software,

People who really want to buy are actually very few.


With ZRM for MySQL should also be, this is also commercial software, but there is a free version, is also very useful


Finally use Xtarbackup Restore, succeeded


This article is from the "people, to have their own ideas" blog, please be sure to keep this source http://szgb2016.blog.51cto.com/340201/1854435

mysql5.7 InnoDB data table spatial file Smooth migration

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.