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 ?
The default engine is InnoDB in MySQL 8.0. You can specify the default engine by using the --default-storage-engine server startup option, or by setting the default-storage-engine option in the my. cnf configuration file.
InnoDB is the default and most general-purpose storage engine, and Oracle recommends using it for tables except for specialized use cases. (The CREATE TABLE statement in MySQL 8.0 creates InnoDB tables by default.)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With