MySQL case combat--MySQL architecture

Preface

This environment is based on Centos 7.8 system to build MySQL-5.7.14 for
specific construction, please refer to MySQL-5.7.14 environment construction


Mysql is composed of SQL interface, parser, optimizer, cache, and storage engine.

MySQL architecture

Insert picture description here

Hierarchical interpretation

Connectors refers to the interaction with SQL in different languages.
Management Services & Utilities: System Management and Control Tool
Connection Pool: Connection Pool. Manage buffering user connections, thread processing and other needs that require buffering. Mainly do authentication, connection restriction, memory checking, etc.
SQL Interface: SQL interface, accepts the user's SQL command, and returns the result that the user needs to query. For example, select from is to call SQL lnterface
Parser: parser. When SQL commands are passed to the parser, they will be verified and parsed by the parser.
Optimizer: Query optimizer. The SQL statement will use the query optimizer to optimize the query before the query.
Cache and Buffer: query cache. If the query cache has a matching query result, the query statement can go directly to the query cache to fetch data.
Engine: storage engine. The storage engine is a specific subsystem dealing with files in MySql.

1. Connection layer

Insert picture description here

# 查看最大连接数
show variables like '%max_connections%';

Second, the SQL layer

Insert picture description here

# 查看缓存配置情况
show variables like '%query_cache%';

Three, plug-in storage engine

Insert picture description here

The earlier version defaults to the myisam storage engine, and the inodb engine is supported by default since version 8.0

Fourth, the file system layer & log layer

Insert picture description here
File system supported by MySQL

Red Hat system supports ext*, xfs and other
windows systems supported by NAT32, NTFS, etc.
Network file system services: NFS, etc
....

Guess you like

Origin blog.csdn.net/XY0918ZWQ/article/details/112553274