php - unable to convert to innodb from myisam
Get the solution ↓↓↓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
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.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: attempt to read property "id" on null
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.
Similar questions
Find the answer in similar questions on our website.
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.