我服务器坏了,换了一台,在新服务器上安装好Mysql后,从旧服务器上备份的Mysql安装目录下的data文件夹里面的数据拷到新服务器上的同名目录下,发现不能用。
我只复制我要的那个数据库sehrw文件夹到data里面时,mysql正常运行;我再把ibdata1文件复制到data里面时,服务启动正常,停止服务停止不了,错误代码是1053。
请问这是怎么回事?我该怎么做才能让ibdata1里面的数据能恢复起来?

解决方案 »

  1.   

    http://blog.chinaunix.net/u/29134/showart_1018020.html
      

  2.   

    这个不是扩容的问题。不知道是否是不同的机子所产生的ibdata1文件不能通用?
    我的mysql是5.2的
      

  3.   

    建议你的那个数据库目录连同ibdata1文件一起拷贝过来,再测试。
    因为ibdata1与那个数据库目录里的某些文件是有关联的。
    分别拷贝,先后测试,不能确定是否会造成局部破坏。
      

  4.   

    我把整个目录覆盖后启动Mysql服务,提示进程意外终止,错误代码:1067
    以下是我从错误日志中看到的:
    InnoDB: ###### Diagnostic info printed to the standard error stream
    InnoDB: Error: log file .\ib_logfile0 is of different size 0 30408704 bytes
    InnoDB: than specified in the .cnf file 0 14680064 bytes!
    081016 15:47:12 [ERROR] Plugin 'InnoDB' init function returned error.
    081016 15:47:12 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    081016 15:47:12 [ERROR] Failed to init plugins.
    081016 15:47:12 [ERROR] Aborting081016 15:47:12 [Note] D:\Program Files\MySQL\MySQL Server 5.2\bin\mysqld-nt: Shutdown completeInnoDB: Error: log file .\ib_logfile0 is of different size 0 30408704 bytes
    InnoDB: than specified in the .cnf file 0 14680064 bytes!
    081016 15:47:19 [ERROR] Plugin 'InnoDB' init function returned error.
    081016 15:47:19 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    081016 15:47:19 [ERROR] Failed to init plugins.
    081016 15:47:19 [ERROR] Aborting081016 15:47:19 [Note] D:\Program Files\MySQL\MySQL Server 5.2\bin\mysqld-nt: Shutdown complete