Вопрос

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. 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.

   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.

please guide

Это было полезно?

Решение

The problem is that your primary key columns are too long for 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 с атрибуция
Не связан с StackOverflow
scroll top