本文介绍了如何使innodb成为默认引擎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将Innodb设置为默认引擎,并在my.cnf文件中对此进行了更改.

I am trying to make Innodb as my default engine and I changed this in the my.cnf file.

我在my.cnf文件中设置了default-storage-engine = InnoDB并重新启动了mysql,但仍然无法使用它.

I set default-storage-engine=InnoDB in my.cnf file and restarted mysql but still it's not taking it.

即使重新启动服务器后,它仍显示默认引擎为MyISAM.

Even after restarting the server, it's still showing default engine as MyISAM.

+ ------------ + --------- +-
|引擎|支持|
+ ------------ + --------- +-
| InnoDB |是|
| MRG_MYISAM |是|
|黑洞|是|
| CSV |是|
|内存|是|
|联合|否|
|存档|是|
| MyISAM |默认 |
+ ------------ + --------- +-

+------------+---------+-
| Engine | Support |
+------------+---------+-
| InnoDB | YES |
| MRG_MYISAM | YES |
| BLACKHOLE | YES |
| CSV | YES |
| MEMORY | YES |
| FEDERATED | NO |
| ARCHIVE | YES |
| MyISAM | DEFAULT |
+------------+---------+-

如何将其更改为InnoDB?

How can I change it to InnoDB ?

推荐答案

请确保将此行添加到my.cnf文件的适当部分.它必须在[mysqld]部分:

Make sure you add this line in the proper section of the my.cnf file. It needs to be in the [mysqld]section:

default-storage-engine=InnoDB

此外,注释掉my.cnf中可能将其设置为MyISAM的任何其他行.

Also, comment out any other line in my.cnf that may be setting it to MyISAM.

这篇关于如何使innodb成为默认引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 21:31