I have a simple question.
I have a mysql databases. I have 2 tables, that uses MYISAM, I want to change to INNODB, one of the table has 1.000 rows, if I do this this change, is there a risk that it will cause any corruption of my data/rows?
I have a simple question.
I have a mysql databases. I have 2 tables, that uses MYISAM, I want to change to INNODB, one of the table has 1.000 rows, if I do this this change, is there a risk that it will cause any corruption of my data/rows?
2
Answers
The two main advantages to switch to InnoDB are reliability and scalability.
Also InnoDB is more granular due to row level locks while MyISAM supports table level locks. Crash recovery in InnoDB is a way better. But bear in mind that it can cause some headaches
I would strongly suggest to check official docs here and here
Changing the MySQL table engine from MyISAM to InnoDB can carry a risk of data corruption. This is because InnoDB and MyISAM use different storage mechanisms, and converting a table from one engine to the other can cause data loss or corruption if the conversion process is not completed successfully.
However, in your case, the table you are converting has only 1,000 rows, so the risk of data corruption is relatively low. It is still a good idea to back up the table before you make the change, as a precaution. You can use the MySQL BACKUP TABLE command to create a backup of the table. Once you have created the backup, you can then use the ALTER TABLE command to change the table engine to InnoDB.