早上,重启了一个MYSQL,之后发现所有innodb表都打不开了,主要想恢复原来的数据出来。请大家出办法。谢谢。

解决方案 »

  1.   

    错误日志内容是什么,贴出来,
    数据是直接COPY的?MYSQL出现问题没有,详细说明
      

  2.   

    InnoDB: The first specified data file .\ibdata1 did not exist:
    InnoDB: a new database to be created!
    110518 15:13:15  InnoDB: Setting file .\ibdata1 size to 10 MB
    InnoDB: Database physically writes the file full: wait...
    110518 15:13:16  InnoDB: Log file .\ib_logfile0 did not exist: new to be created
    InnoDB: Setting log file .\ib_logfile0 size to 5 MB
    InnoDB: Database physically writes the file full: wait...
    110518 15:13:18  InnoDB: Log file .\ib_logfile1 did not exist: new to be created
    InnoDB: Setting log file .\ib_logfile1 size to 5 MB
    InnoDB: Database physically writes the file full: wait...
    InnoDB: Doublewrite buffer not found: creating new
    InnoDB: Doublewrite buffer created
    InnoDB: Creating foreign key constraint system tables
    InnoDB: Foreign key constraint system tables created
    110518 15:13:19  InnoDB: Started; log sequence number 0 0
    110518 15:13:19 [Note] mysqld-nt.exe: ready for connections.
    Version: '5.0.27-community-nt'  socket: ''  port: 3306  MySQL Community Edition (GPL)
    110518 15:15:04 [ERROR] Table .\tmp\admin_member has no primary key in InnoDB data dictionary, but has one in MySQL! If you created the table with a MySQL version < 3.23.54 and did not define a primary key, but defined a unique key with all non-NULL columns, then MySQL internally treats that key as the primary key. You can fix this error by dump + DROP + CREATE + reimport of the table.
    110518 15:15:04 [Warning] Table .\tmp\admin_member key_used_on_scan is 0 even though there is no primary key inside InnoDB.
    110518 15:15:04110518 15:15:04 [ERROR] Table tmp/admin_member contains fewer indexes inside InnoDB than are defined in the MySQL .frm file. Have you mixed up .frm files from different installations? See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html110518 15:15:55110518 15:15:55 [ERROR] Cannot find table ggoa/admin_member from the internal data dictionary
    of InnoDB though the .frm file for the table exists. Maybe you
    have deleted and recreated InnoDB data files but have forgotten
    to delete the corresponding .frm files of InnoDB tables, or you
    have moved .frm files to another database?
    See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html
    how you can resolve the problem.110518 15:15:55110518 15:15:55 [ERROR] Cannot find table ggoa/admin_member from the internal data dictionary
    of InnoDB though the .frm file for the table exists. Maybe you
    have deleted and recreated InnoDB data files but have forgotten
    to delete the corresponding .frm files of InnoDB tables, or you
    have moved .frm files to another database?
    See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html
    how you can resolve the problem.
      

  3.   

    InnoDB: The first specified data file .\ibdata1 did not exist:
    InnoDB: a new database to be created!
    110518 15:13:15 InnoDB: Setting file .\ibdata1 size to 10 MB
    InnoDB: Database physically writes the file full: wait...
    110518 15:13:16 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
    InnoDB: Setting log file .\ib_logfile0 size to 5 MB
    InnoDB: Database physically writes the file full: wait...
    110518 15:13:18 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
    InnoDB: Setting log file .\ib_logfile1 size to 5 MB
    InnoDB: Database physically writes the file full: wait...
    InnoDB: Doublewrite buffer not found: creating new
    InnoDB: Doublewrite buffer created
    InnoDB: Creating foreign key constraint system tables
    InnoDB: Foreign key constraint system tables created
    110518 15:13:19 InnoDB: Started; log sequence number 0 0
    110518 15:13:19 [Note] mysqld-nt.exe: ready for connections.
    Version: '5.0.27-community-nt' socket: '' port: 3306 MySQL Community Edition (GPL)
    110518 15:15:04 [ERROR] Table .\tmp\admin_member has no primary key in InnoDB data dictionary, but has one in MySQL! If you created the table with a MySQL version < 3.23.54 and did not define a primary key, but defined a unique key with all non-NULL columns, then MySQL internally treats that key as the primary key. You can fix this error by dump + DROP + CREATE + reimport of the table.
    110518 15:15:04 [Warning] Table .\tmp\admin_member key_used_on_scan is 0 even though there is no primary key inside InnoDB.
    110518 15:15:04110518 15:15:04 [ERROR] Table tmp/admin_member contains fewer indexes inside InnoDB than are defined in the MySQL .frm file. Have you mixed up .frm files from different installations? See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html110518 15:15:55110518 15:15:55 [ERROR] Cannot find table ggoa/admin_member from the internal data dictionary
    of InnoDB though the .frm file for the table exists. Maybe you
    have deleted and recreated InnoDB data files but have forgotten
    to delete the corresponding .frm files of InnoDB tables, or you
    have moved .frm files to another database?
    See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html
    how you can resolve the problem.110518 15:15:55110518 15:15:55 [ERROR] Cannot find table ggoa/admin_member from the internal data dictionary
    of InnoDB though the .frm file for the table exists. Maybe you
    have deleted and recreated InnoDB data files but have forgotten
    to delete the corresponding .frm files of InnoDB tables, or you
    have moved .frm files to another database?
    See http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html
    how you can resolve the problem.
      

  4.   

    为什么ibdata1 、ib_logfile0不存在?数据是直接COPY的?
    检查一下 MY。INI中数据的目录
      

  5.   


    我是使用apmserv服务,每次关闭服务,就会自动删除ibdata1,id_logfile0,每次开就自动生成。
      

  6.   

    ....那之前的innodb表能看到就怪了
      

  7.   

    日志、数据文件都删除了,FRM文件删除没有
      

  8.   

    没有好的办法,找到你原来的IBDATA文件,复制回去。
    如果你确认没做过什么,则在你的硬盘上搜索一下 ibdata1 看看在哪个目录中有。估计是你启动的时候没有加对启动选项参考,选择了错误的DATADIR。