MySQL database storage engine and data type

Source: Internet
Author: User
Tags table definition

First, view the supported storage engines

SHOW ENGINES \g;

Or

SHOW VARIABLES like ' have% ';

Second, the installation version of MySQL default engine is InnoDB, free install version of the default engine is MyISAM

Third, query the default storage engine

SHOW VARIABLES like ' storage_engine% ';

Iv. Modifying the default storage engine

1. Through the wizard

2. Modify the My.ini configuration file

V. Select the storage engine

1.Myisam is the default storage engine for MySQL. When create creates a new table, MyISAM is used by default when the storage engine for the new table is not specified. Each myisam is stored as three files on disk. The file name is the same as the table name, and the extension is. frm (store table definition), respectively. MYD (MYData, storing data),. MYI (myindex, storage index). Data files and index files can be placed in different directories, evenly distributed IO, for faster speeds.
The 2.InnoDB storage Engine provides transactional security with commit, rollback, and crash resiliency. However, compared to the MyISAM storage engine, InnoDB writes are less efficient and consume more disk space to preserve data and indexes.

Vi. Types of data

1. Integer type

2. Floating-point type, fixed-point number type, and bit type

3. Date and Time type

4. String type

MySQL database storage engine and data type

Related Article

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.