How to make the default engine to be innodb in MySQL?(BATCH)
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
精彩评论