在windows上面配置建立了一个innodb的独立表空间的数据库..
create database xxx;use xxx;create table xx1(
id varchar(20)
)engine=innodb;insert into xx1 values('aaaa');文件存放到%mysql%/data/下面..将下面的xxx数据库文件里面的东西,同样的复制到linux下的/var/lib/mysql/下....在linux下的mysql里面(linux下的mysql同样也设置的独立表空间)
为什么只能显示表结构,却没有数据呢?

解决方案 »

  1.   

    innodb; 的表结构文件是 *.frm 存放在数据库为名的目录下。但它的数据文件和MYISAM不一样,不是放在*。MYD中,而是放在%mysql%/data/中的ibdata* 中。
      

  2.   

    MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html
      

  3.   

     我是用的独立表空间innodb_file_per_table 请ACMAIN_CHM大哥详解··
      

  4.   


    innodb还有一些公有数据在全局表空间中(如:%mysql%/data/中的ibdata*) 所以一般来说需要导出再导入才能转移书据
      

  5.   

    参考
    http://dev.mysql.com/doc/refman/5.1/en/multiple-tablespaces.htmlYou cannot freely move .ibd files between database directories as you can with MyISAM table files. This is because the table definition that is stored in the InnoDB shared tablespace includes the database name, and because InnoDB must preserve the consistency of transaction IDs and log sequence numbers. 
      

  6.   

    LS 说很清楚了 

    InnoDB 不能通过简单的复制黏贴进行表转移...你还是通过进行单独表 输出 然后再倒入