【问题标题】:innoDB tablew are not showing after backup备份后不显示 innoDB tablew
【发布时间】:2012-04-29 07:40:57
【问题描述】:

我最近在使用 win 7 时遇到了问题,所以我不得不重新安装....而且我也不得不用 mysql 重新安装 web 服务器

之前我有 mysql 5.1 现在我有 5.5。

我已从 C:\ProgramData\MySQL\MySQL Server 5.1\data(我的数据库的复制目录)

我现在已将所有目录复制到 C:\ProgramData\MySQL\MySQL 服务器 5.5\data

检查结果时,我只看到了 myisqm 表,没有 innodb 表!

SHOW ENGINES 给了我这个

FEDERATED   NO  Federated MySQL storage engine  NULL    NULL    NULL
MRG_MYISAM  YES Collection of identical MyISAM tables   NO  NO  NO
MyISAM  YES MyISAM storage engine   NO  NO  NO
BLACKHOLE   YES /dev/null storage engine (anything you write to it...   NO  NO  NO
CSV YES CSV storage engine  NO  NO  NO
MEMORY  YES Hash based, stored in memory, useful for temporary...   NO  NO  NO
ARCHIVE YES Archive storage engine  NO  NO  NO
InnoDB  DEFAULT Supports transactions, row-level locking, and fore...   YES YES YES
PERFORMANCE_SCHEMA  YES Performance Schema  NO  NO  NO

那我该怎么办?我检查了相关文件在目录中...... f.e.

分类广告.frm 分类广告.MYD 分类广告.MYI

好的,我停止了 mysql55 服务,我覆盖了文件: - ibdata1 - ib_logfile0 - ib_logfile1

来自我的备份...但是当我重新启动服务时出现错误:进程意外终止。检查日志时:

120429  9:52:29 [Note] Plugin 'FEDERATED' is disabled.
120429  9:52:29 InnoDB: The InnoDB memory heap is disabled
120429  9:52:29 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120429  9:52:29 InnoDB: Compressed tables use zlib 1.2.3
120429  9:52:29 InnoDB: Initializing buffer pool, size = 59.0M
120429  9:52:29 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 130023424 bytes
InnoDB: than specified in the .cnf file 0 31457280 bytes!
120429  9:52:29 [ERROR] Plugin 'InnoDB' init function returned error.
120429  9:52:29 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120429  9:52:29 [ERROR] Unknown/unsupported storage engine: INNODB
120429  9:52:29 [ERROR] Aborting

120429  9:52:29 [Note] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Shutdown complete

【问题讨论】:

    标签: mysql windows-7 innodb


    【解决方案1】:

    你知道 InnoDB 数据文件在那里吗? IE。文件命名如下:
    - ibdata1
    - ib_logfile0
    - ib_logfile1

    然后尝试从命令行运行

    mysql_upgrade -u root -p
    

    然后在出现提示时输入您的密码。

    【讨论】:

    • 我检查了这 3 个文件并在那里,我是否也需要从备份中覆盖这 3 个文件?
    • 这些文件是 InnoDB 表的数据。 .frm 只是表结构。所以是的,您将需要备份中的这些文件。
    • 您需要找到包含 inodb 日志文件大小的.cnf 文件并更新为实际大小。
    • my.cnf 配置中查找innodb_log_file_size 变量。如果它不存在,则添加它,在 [mysqld] 部分下(有一行说 InnoDB 默认启用,放在下面)。将值设置为200M 以允许接受更大的文件大小。它应该是:innodb_log_file_size =200M
    • 我确实把它改成了200M但是没有用,还是同样的错误,现在我正在寻找cnf文件
    【解决方案2】:

    好的,JScoobyCed 建议我更改 my.ini 文件中 innodb_log_file_size 的大小...

    经过几次尝试,我找到了正确的大小......在我的例子中是 innodb_log_file_size =124M,因为我的备份文件 ib_logfile0 和 ib_logfile1 大约 126MB 大

    谢谢

    我终于把桌子拿回来了……

    呜呜呜呜

    【讨论】:

      猜你喜欢
      • 2012-11-24
      • 2019-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-13
      相关资源
      最近更新 更多