How can I install or enable innoDB in MySQL?

MySQLMySQLi Database

In order to enable innoDB in MySQ, you need to work around my.ini file. However, in MySQL version 8, the default storage engine is innoDB. Check the same from my.ini file −

You can even set this at the time of table creation −

mysql> create table DemoTable
   (
   StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
   StudentFirstName varchar(100),
   StudentLastName varchar(100),
   StudentAge int
   ) ENGINE=InnoDB;
Query OK, 0 rows affected (1.66 sec)

Let us now run a query to check the engine type of specific table −

mysql> select table_name,engine from information_schema.tables where table_name="DemoTable";

This will produce the following output −

+--------------+--------+
| TABLE_NAME   | ENGINE |
+--------------+--------+
| DemoTable    | InnoDB |
+--------------+--------+
1 row in set (0.16 sec)
raja
Published on 22-Aug-2019 15:22:16
Advertisements