1.MYSQL支持的数据引擎列表如下:
MyISAM Default engine as of MySQL 3.23 with great performance
MEMORY Hash based, stored in memory, useful for temporary tables
InnoDB Supports transactions, row-level locking, and foreign keys
BerkeleyDB Supports transactions and page-level locking
BLACKHOLE /dev/null storage engine (anything you write to it disappears)
EXAMPLE Example storage engine
ARCHIVE Archive storage engine
CSV CSV storage engine
ndbcluster Clustered, fault-tolerant, memory-based tables
FEDERATED Federated MySQL storage engine
MRG_MYISAM Collection of identical MyISAM tables
ISAM Obsolete storage engine
2.其中默认的是MyISAM数据引擎,可惜此引擎不支持事务处理,我们需要将默认的数据引擎改为InnoDB。
3.InnoDB和BerkeleyDB支持事务处理,可惜默认的情况下都是被disable的。
所有的引擎里面,InnoDB性能最强大,算是商业级的。
4.启动InnoDB引擎的方法如下:
1)关闭mysql的服务
2)修改my.ini
将default-storage-engine=INNODB前的注释(#)去掉
将skip-innodb这行注释(加上#)
3)保存后重启mysql服务
5.在mysql.exe中可以用 show engines/G; 命令查看各个引擎的状态
mysql> show engines/G
*************************** 1. row ***************************
Engine: MyISAM
Support: YES
Comment: Default engine as of MySQL 3.23 with great performance
*************************** 2. row ***************************
Engine: MEMORY
Support: YES
Comment: Hash based, stored in memory, useful for temporary tables
*************************** 3. row ***************************
Engine: InnoDB
Support: DEFAULT
Comment: Supports transactions, row-level locking, and foreign keys
*************************** 4. row ***************************
Engine: BerkeleyDB
Support: NO
Comment: Supports transactions and page-level locking
*************************** 5. row ***************************
Engine: BLACKHOLE
Support: YES
Comment: /dev/null storage engine (anything you write to it disappears)
*************************** 6. row ***************************
Engine: EXAMPLE
Support: NO
Comment: Example storage engine
*************************** 7. row ***************************
Engine: ARCHIVE
Support: YES
Comment: Archive storage engine
*************************** 8. row ***************************
Engine: CSV
Support: NO
Comment: CSV storage engine
*************************** 9. row ***************************
Engine: ndbcluster
Support: NO
Comment: Clustered, fault-tolerant, memory-based tables
*************************** 10. row ***************************
Engine: FEDERATED
Support: YES
Comment: Federated MySQL storage engine
*************************** 11. row ***************************
Engine: MRG_MYISAM
Support: YES
Comment: Collection of identical MyISAM tables
*************************** 12. row ***************************
Engine: ISAM
Support: NO
Comment: Obsolete storage engine
12 rows in set (0.00 sec)