9
votes

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

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

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

show engines

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

How can I change it to InnoDB ?

1
Can you please try default-storage-engine=innobase?AndreKR
default-storage-engine=innobase - Nope it did not work..user476554
@user476554 - check your full command that you used to connect to mysql, Or show variables like '%engine%';ajreal
mysql> show variables like "%engine%" -> ; +---------------------------+--------+ | Variable_name | Value | +---------------------------+--------+ | engine_condition_pushdown | ON | | storage_engine | MyISAM | +---------------------------+--------+ 2 rows in set (0.00 sec)user476554

1 Answers

19
votes

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

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