I am developing a web app for which I plan to use InnoDB. However I read that sometimes InnoDB is not enabled by default and, one needs to change mysql config to enable it... Is that true? Since my web app will be installed by client themselves on their own web space, I need to make sure my app is as compatible as possible. If InnoDB is disabled by default, then I have to look for workarounds.
You can check to see if your server supports InnoDB by using:
I also read:
"The Windows Essentials installer makes InnoDB the MySQL default storage engine on Windows, if the server being installed supports InnoDB. "
InnoDB has been around since MySQL 4.0, and compiled in to most releases except for some special ones - like what is given to OEM vendors.
Some (very cheap) hosting providers choose to disable it because it uses a little bit more memory. For the most part they are in the minority though, so you shouldn't need to worry.
The wording "default storage engine" shouldn't need to concern you either. That just means what happens when you don't specify one. i.e.
CREATE TABLE my_table (a int);
- instead of -
CREATE TABLE my_table (a int) ENGINE=INNODB;
If you are restoring from mysqldump, it will retain the ENGINE information. If InnoDB doesn't exist, MySQL will automatically substitute MyISAM (unless you change the default sql_mode to avoid this substitution).