简体   繁体   English

无法从myisam转换为innodb

[英]unable to convert to innodb from myisam

i was trying to convert myisam table to innodb as i was frustrated with myisam table level of lock and i was in desperate need to solve this issue. 我试图将myisam表转换为innodb,因为我对myisam表级别的锁定感到沮丧,并且我迫切需要解决此问题。 i tried from phpmyadmin and chosen the engine from dropdown to innodb and clicked on go but i am getting this error.in my table there are 5 million rows. 我从phpmyadmin尝试,从下拉列表中选择了引擎,然后选择了innodb,然后单击go,但是我遇到了这个错误。在我的表中有500万行。

   SQL query: Edit Edit

     ALTER TABLE `tableA`
       ENGINE = InnoDB;

    MySQL said: Documentation
    #1071 - Specified key was too long; max key length is 767 bytes 

is there any way i can convert table by choosing 100 row at a time so that if i run that code/scripts several time entire table will be converted to innodb. 有什么办法可以一次选择100行来转换表,以便如果我多次运行该代码/脚本,整个表将被转换为innodb。

please guide 请指导

The problem is that your primary key columns are too long for InnoDB. 问题是您的主键列对于InnoDB来说太长了。 First alter the length of the Primary Key columns of this table to something reasonable according to what data you store. 首先,根据您存储的数据,将该表的“主键”列的长度更改为合理的长度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM