tags:

views:

36

answers:

1

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 to each of the create table statement?

+1  A: 

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

Pascal MARTIN