InnoDB Storage engine for MySQL

Source: Internet
Author: User
Mysql uses the InnoDB Storage engine by default from 5.5. to use the InnoDB Storage engine, you must add the compilation parameters when compiling and installing mysql. The different compilation parameters of the versions are also omitted.

Mysql uses the InnoDB Storage engine by default from 5.5. to use the InnoDB Storage engine, you must add the compilation parameters when compiling and installing mysql. The different compilation parameters of the versions are also omitted.

Mysql uses the InnoDB Storage engine by default from 5.5. to use the InnoDB Storage engine, you must add the compilation parameters when compiling and installing mysql. The compilation parameters of different versions are also slightly different, you can also install the innoDB Storage engine by dynamically loading plug-ins after installing mysql.
How to store innodb data tables on hard disks:

# Every time a data table is created, mysql creates a hard disk file to save the format of the data table. The file and the data table name are the same. frm is the extension. If a data table zhu is created, a zhu is created in the database subdirectory where the table is located. frm file. (Whether it's innodb or myisam storage engine, this file must be created in this way)
# By default, InnoDB stores the data table content in a shared bucket,
# You can modify the configuration file to store the data content of each table in a separate tablespace. Even so, the shared tablespace is indispensable because the data dictionary will still exist in the shared tablespace.
Mysql> show create table student;
+ --------- + Response +
| Table | Create Table |
+ --------- + Response +
| Student | create table 'student '(
'Id' int (11) default null,
'Name' varchar (20) DEFAULT NULL
) ENGINE = InnoDB default charset = utf8 |
+ --------- + Response +
1 row in set (0.00 sec)
[Root @ zhu2 zhujiangtao] # ll
-Rw ---- 1 mysql 8586 10-26 student. frm # Table Structure

Features of the innodb Storage engine:

#1. Support transaction commit and rollback
#2. Automatic Recovery after system crash, better self-repair function
#3. Support for foreign key and reference integrity, including recursive deletion and update
#4. Supports row-level locks,
#5. by default, the innodb Storage engine stores data in a shared tablespace. the innodb tablespace can consist of a single file, multiple files, and original partitions, in fact, the innodb tablespace is like a virtual file system that stores and manages the content of the innodb data table. In this way, the length of the data table can exceed the maximum length limit of each file in the file system, you can also configure the innodb Storage engine to create a tablespace for each data table. At this time, each data table has a corresponding tablespace in its database subdirectory. ibd file.


Innodb configuration parameters

Recommended reading:

Startup, shutdown, and restoration of the InnoDB Storage Engine

MySQL InnoDB independent tablespace Configuration

Architecture of MySQL Server layer and InnoDB Engine Layer

InnoDB deadlock Case Analysis

MySQL Innodb independent tablespace Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.