Linux下查看MySQL存储引擎
Linux下查看MySQL存储引擎
Linux环境下查看MySQL存储引擎:
Server version: 5.0.45 Source distribution
mysql> show engines;
+------------+---------+----------------------------------------------------------------+
| Engine | Support | Comment |
+------------+---------+----------------------------------------------------------------+
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys |
| BerkeleyDB | YES | Supports transactions and page-level locking |
| BLACKHOLE | NO | /dev/null storage engine (anything you write to it disappears) |
| EXAMPLE | NO | Example storage engine |
| ARCHIVE | NO | Archive storage engine |
| CSV | NO | CSV storage engine |
| ndbcluster | NO | Clustered, fault-tolerant, memory-based tables |
| FEDERATED | NO | Federated MySQL storage engine |
| MRG_MYISAM | YES | Collection of identical MyISAM tables |
| ISAM | NO | Obsolete storage engine |
+------------+---------+----------------------------------------------------------------+
12 rows in set (0.00 sec)这个表格显示了可用的数据库引擎的全部名单以及在当前的数据库服务器中是否支持这些引擎。
更灵活的方式是在随MySQL服务器发布同时提供的MySQL客户端时指定使用的存储引擎。最直接的方式是在创建表时指定存储引擎的类型,向下面这样:
CREATE TABLE mytable (id int, title char(20)) ENGINE = INNODB
你还可以改变现有的表使用的存储引擎,用以下语句:
ALTER TABLE mytable ENGINE = MyISAM
评论暂时关闭