如何从 .ibd 文件重新创建 MySQL InnoDB 表?
假设已从备份磁带恢复了以下 MySQL 文件:
tablename.frm
tablename.ibd
此外,假设 MySQL 安装使用 innodb_file_per_table
运行code> 并且使用 mysqladmin shutdown
彻底关闭了数据库。
如果全新安装了与恢复的 MySQL 文件相同的 MySQL 版本,如何将数据从 tablename.ibd
/tablename.frm
导入到这个新安装中?
Assume that the following MySQL files have been restored from a backup tape:
tablename.frm
tablename.ibd
Furthermore, assume that the MySQL installation was running with innodb_file_per_table
and that the database was cleanly shutdown with mysqladmin shutdown
.
Given a fresh install of the same MySQL version that the restored MySQL files were taken from, how do I import the data from tablename.ibd
/tablename.frm
into this new install?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
类似的事情在这里得到了回答。
请看一下
https://stackoverflow.com/a/10943833/3985205
Similar thing is answered here.
please have a look
https://stackoverflow.com/a/10943833/3985205
您必须将表放入表空间:
https://www. percona.com/doc/percona-xtrabackup/2.2/innobackupex/restoring_individual_tables_ibk.html
您还必须拥有一个 exp/cfg 文件。
You must bring the table into the tablespace:
https://www.percona.com/doc/percona-xtrabackup/2.2/innobackupex/restoring_individual_tables_ibk.html
There is also a exp/cfg file you must have.
当您丢失 ib_logfiles 和 ibdata 文件并且只有 .frm 和 .idb 文件时,我发布了正确的解决方案。
这也适合您。
谢谢。
I posted the correct solution when you lost
ib_logfiles
andibdata
file and you have only.frm
and.idb
files.This will work for you, too.
Thank you.
这并不适用于所有情况。
但是,是的,它在某些情况下起作用...
首先停止与您使用的 wamp 或 xampp 相关的所有服务。
tablename.frm、tablename.ibd
然后复制并粘贴mysql/data/DATABASE NAME FOLDER 下的 文件。
然后再次启动所有服务。在该数据库下创建的平板电脑。
This not may work in all cases.
But yes it is working in some case...
First stop all the services related to wamp or xampp which you use.
Then copy and past the tablename.frm, tablename.ibd
files under mysql/data/DATABASE NAME FOLDER.
then start all the services again. the tablet created under that DB.