要想找出你的服务器支持哪个存储引擎,执行下面的语句:
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 |
| HEAP | YES | Alias for MEMORY |
| MERGE | YES | Collection of identical MyISAM tables |
| MRG_MYISAM | YES | Alias for MERGE |
| ISAM | NO | Obsolete storage engine, now replaced by MyISAM |
| MRG_ISAM | NO | Obsolete storage engine, now replaced by MERGE |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys |
| INNOBASE | YES | Alias for INNODB |
| BDB | YES | Supports transactions and page-level locking |
| BERKELEYDB | YES | Alias for BDB |
| NDBCLUSTER | NO | Clustered, fault-tolerant, memory-based tables |
| NDB | NO | Alias for NDBCLUSTER |
| EXAMPLE | NO | Example storage engine |
| ARCHIVE | YES | Archive storage engine |
| CSV | NO | CSV storage engine |
| FEDERATED | YES | Federated MySQL storage engine |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) |
+------------+---------+----------------------------------------------------------------+
18 rows in set (0.00 sec)
你还可以使用下面的语句代替SHOW ENGINES,并检查你感兴趣的存储引擎的变量值:
mysql> SHOW VARIABLES LIKE 'have%';
+-----------------------+----------+
| Variable_name | Value |
+-----------------------+----------+
| have_archive | YES |
| have_bdb | NO |
| have_blackhole_engine | YES |
| have_compress | YES |
| have_crypt | YES |
| have_csv | YES |
| have_example_engine | NO |
| have_federated_engine | NO |
| have_geometry | YES |
| have_innodb | YES |
| have_isam | NO |
| have_ndbcluster | DISABLED |
| have_openssl | NO |
| have_partition_engine | YES |
| have_query_cache | YES |
| have_raid | NO |
| have_rtree_keys | YES |
| have_symlink | YES |
+-----------------------+----------+
18 rows in set (0.01 sec)
SHOW命令的精确输出随使用的MySQL版本(和启用的特性)的不同而有变化。第2列的值表示各特性支持的服务器级别,如下所示:
值 |
含义 |
YES |
支持该特性并已经激活。 |
NO |
不支持该特性。 |
DISABLED |
支持该特性但被禁用。 |
NO值表示编译的服务器不支持该特性,因此在运行时不能激活。
出现DISABLED值是因为服务器启动时该特性被禁用,或没有给出启用它的所有选项。在后一种情况,host_名.err错误日志文件应包含该选项被禁用的原因。
如果服务器支持InnoDB或BDB存储引擎,你还可以看见DISABLED,但在运行启动时使用了--skip-innodb或--skip-bdb选项。对于NDB CLUSTER存储引擎,DISABLED表示服务器支持MySQL Cluster,但启动时未启用--ndb-cluster选项。
所有MySQL服务器支持MyISAM表,因为MyISAM是 默认存储引擎。
欢迎光临 PHP开发笔记 (http://phpvi.com/) | Powered by Discuz! 6.1.0 |