各位大侠,我在MySQL 5.1.39supportfile文件夹下my-small.cnf,my-medium.cnf,my-large.cnf,my-huge.cnf里找了很久都没有default-storage-engine的选项,/etc下的my.cnf是my-small.cnf拷过去的,如果加入default-storage-engine=InnoDB,就会提示unknown variable。请问如何能让MySQL默认使用InnoDB引擎?无知啊,我快急疯了...
调试欢乐多
default-storage-engine=INNODB
default-storage-engine=INNODB
SHOW ENGINES贴结果
不行
# mysql -uroot -p
mysql: unknown variable 'default-storage-engine=INNODB'
你是如何安装MYSQL的?
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
8 rows in set (0.00 sec)
alter table tablename type innodb;
试试
[mysqld]# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB
安装上面的操作了为什么还是不行呢
show engines;| InnoDB | DISABLED | Supports transactions, row-level locking, and foreign keys |