How to change the default engine of Mysql to Innodb: mysqlinnodb
Preface
InnoDB and MyISAM are the two most common table types used by many people when using MySQL. The two table types have their own advantages and disadvantages, depending on the specific application.
The basic difference is:The MyISAM type does not support advanced processing such as transaction processing, whereas the InnoDB type does. MyISAM tables emphasize performance, and the execution speed is faster than that of InnoDB, but transactions are not supported. InnoDB provides advanced database functions such as transaction support and external keys.
The reason why I want to change the default engine is actually very simple. The default Mysql engine I use is MyISAM, and MyISAM does not support transaction processing, so I need to change its engine.
To change the default Mysql engine to InnoDB, follow these steps:
By default, Mysql disables the InnoDB Storage engine and sets InnoDB as the default engine as follows.
1. view the Mysql storage engine:Mysql> show engines InnoDB | YES
The Mysql database server supports the InnoDB engine.
2. Set InnoDB as the default engine: In the configuration fileMy. ini
Under [mysqld] InDefault-storage-engine = INNODB
3. Restart the Mysql server
4. log on to the Mysql database,Mysql> show engines
IfInnoDB | DEFAULT
Indicates that InnoDB is successfully set as the default engine.
Summary
The above is all about changing the default Mysql engine to Innodb. I hope the content in this article will help you in your study or work. If you have any questions, please leave a message.