Last Updated: February 25, 2016
·
632
· rohitkotian

Storage engine: MySQL

A brief description of the different types of storage engines are:
- InnoDB: Supports transactions, row-level locking, and foreign keys.
- MRG_MYISAM: Collection of identical MyISAM tables.
- BLACKHOLE: /dev/null storage engine (anything you write to it disappears)
- CSV: CSV storage engine.
- MEMORY: Hash based, stored in memory, useful for temporary tables
- FEDERATED: Federated MySQL storage engine
- ARCHIVE: Archive storage engine
- MyISAM: Default engine as of MySQL 3.23 with great performance

When I installed MySQL in a Amazon cloud, the default engine that it selected was MyISAM for performance benefits. But: http://tag1consulting.com/MySQL_Engines_MyISAM_vs_InnoDB explains how InnoDB is as good as MyISAM.

So the next question is how do we change the default engine?

Well, simply find the MySQL config file: (In Linux should be in /etc/mysql/my.cnf)
In the file find
[mysqld]
Add a line below it:
default-storage-engine = innodb

Then the obvious step is to restart mysql: service mysql restart