php - unable to convert to innodb from myisam

96

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

733

Answer

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.

People are also looking for solutions to the problem: Get a javascript variable to a php one

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.