
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Is INNODB enabled by default in MySQL?
Yes, it is enabled by default from MySQL version 4.0. Here, we are using MySQL version 8.0.1 −
mysql> select version(); +-----------+ | version() | +-----------+ | 8.0.12 | +-----------+ 1 row in set (0.00 sec)
Let us now check the my.ini wherein the default engine type InnoDB is visible −
Let us first create two table. One of them would be set with engine type, whereas the other one won’t be set with the engine type.
The first table −
mysql> create table DemoTable1(Id int NOT NULL AUTO_INCREMENT PRIMARY KEY); Query OK, 0 rows affected (0.80 sec)
The second table set with ENGINE InnoDB −
mysql> create table DemoTable2( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY ) ENGINE=InnoDB; Query OK, 0 rows affected (0.76 sec)
Both of the above tables have engine type InnoDB whether you have mentioned the engine type or not.
Let us check the engine type of the first table −
mysql> select engine from information_schema.TABLES where TABLE_SCHEMA = 'web' and table_name='DemoTable1'; +--------+ | ENGINE | +--------+ | InnoDB | +--------+ 1 row in set (0.56 sec)
Let us now check the engine type of the second table −
mysql> select engine from information_schema.TABLES where TABLE_SCHEMA = 'web' and table_name='DemoTable2'; +--------+ | ENGINE | +--------+ | InnoDB | +--------+ 1 row in set (0.00 sec)
As you can both of the above table display the engine type as “InnoDB”. The engine type visible is “InnoDB” even when we haven’t mentioned the engine type in DemoTable1.
- Related Articles
- MyISAM versus InnoDB in MySQL?
- Is there a default ORDER BY value in MySQL?
- AUTO_INCREMENT in MySQL can be signed by default?
- Using “TYPE = InnoDB” in MySQL throws an exception?
- Converting table from MyISAM to INNODB in MySQL?
- Adding a column whose value is not null by default in MySQL?
- Emerging Technologies Enabled by the Cloud
- How can I see global locks in MySQL (innodb)?
- How can I install or enable innoDB in MySQL?
- MySQL - changing table engine from innoDB to MyISAM?
- What is meant by Default Risk and Default Premium?
- How to convert MyISAM to InnoDB storage engine in MySQL?
- How to know if MySQL binary log is enabled through SQL command?
- How to display all tables in MySQL with InnoDB storage engine?
- While creating a MySQL table, how can I specify the storage engine of my choice rather than using the default storage engine InnoDB?

Advertisements