Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top