mysql> show engines; +------------+---------+-----------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +------------+---------+-----------------------------------------------------------+--------------+------+------------+ | CSV | YES | CSV storage engine | NO | NO | NO | | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO | +------------+---------+-----------------------------------------------------------+--------------+------+------------+ 4 rows in set (0.00 sec)
如果要在装好后修改的话你可以打开MySQL Administrator->Startup Variables->General Parameters选项卡->Default Storage,里面更改就行了。
我这里默认 innodb 好像关闭的
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
| CSV | YES | CSV storage engine | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
+------------+---------+-----------------------------------------------------------+--------------+------+------------+
4 rows in set (0.00 sec)
5.1.34肯定是自带innodb的my.cnf中可以增加一个选项default-storage-engine,这样当你create table不指定storage engine时采用这个,不过当你指定的时候肯定不会出问题。create table t(a int) engine=innodb;之后你再用show create table t看下,观察到底使用了什么engine
现在情况是 我指定了 innodb 结果还是 用myisam的引擎
应该是innodb没有开启
说明你的服务器里压根没支持这个存储引擎