开发者

How to make the default engine to be innodb in MySQL?(BATCH)

开发者 https://www.devze.com 2022-12-23 02:02 出处:网络
I need to create dozens of tables,and I need them to be innodb, is there an way to do this instead of appending engine=innodb t开发者_Go百科o each of the create table statement?The default engine can

I need to create dozens of tables,and I need them to be innodb,

is there an way to do this instead of appending engine=innodb t开发者_Go百科o each of the create table statement?


The default engine can be specified at the server level, using this in your my.cnf file :

set-variable    = default-storage-engine=INNODB

But note it'll impact all table creations on that server, if they don't specify another engine.


You can also specify the default engine for your current MySQL session, using :

SET storage_engine=INNODB;


For more informations, you can take a look at this section of the MySQL manual : 13.3. Setting the Storage Engine

0

精彩评论

暂无评论...
验证码 换一张
取 消