首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何恢复MySQL5.5数据库?

如何恢复MySQL5.5数据库?
EN

Server Fault用户
提问于 2019-07-09 19:55:42
回答 1查看 238关注 0票数 1

我正在尝试恢复mysql数据库,但没有成功。

我在user.err文件中得到的错误消息

代码语言:javascript
复制
190709 12:28:14 [Note] Plugin 'FEDERATED' is disabled.
190709 12:28:14 InnoDB: The InnoDB memory heap is disabled
190709 12:28:14 InnoDB: Mutexes and rw_locks use Windows interlocked functions
190709 12:28:14 InnoDB: Compressed tables use zlib 1.2.3
190709 12:28:14 InnoDB: Initializing buffer pool, size = 128.0M
190709 12:28:14 InnoDB: Completed initialization of buffer pool
InnoDB: Error: auto-extending data file .\ibdata1 is of a different size
InnoDB: 64 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
190709 12:28:14 InnoDB: Could not open or create data files.
190709 12:28:14 InnoDB: If you tried to add new data files, and it failed here,
190709 12:28:14 InnoDB: you should now edit innodb_data_file_path in my.cnf back
190709 12:28:14 InnoDB: to what it was, and remove the new ibdata files InnoDB created
190709 12:28:14 InnoDB: in this failed attempt. InnoDB only wrote those files full of
190709 12:28:14 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
190709 12:28:14 InnoDB: remove old data files which contain your precious data!
190709 12:28:14 [ERROR] Plugin 'InnoDB' init function returned error.
190709 12:28:14 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190709 12:28:14 [ERROR] Unknown/unsupported storage engine: INNODB
190709 12:28:14 [ERROR] Aborting

我试过的

  1. 在另一台计算机上安装mysql,其路径与崩溃的数据库相同
  2. 创建了一个与旧数据库名称相同的空数据库。
  3. 停止在新计算机上的mysql服务
  4. 新计算机mysql/data中的备份文件
  5. 将旧文件ib_logfile0、ib_logfile1和ibdata1复制到新计算机mysql/data目录中
  6. 在新计算机中启动mysql

我得到了错误信息

EN

回答 1

Server Fault用户

发布于 2019-07-09 22:17:19

检查ibdata1文件的当前大小,或者更好地检查旧机器上的my.cnf,并在新框的my.cnf中设置参数innodb_data_file_path以匹配ibdata1大小/旧配置

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/974584

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档