Mysql architecture diagram

Mysql architecture diagram

Insert image description here
The first layer: client connection processing, security authentication, authorization, etc. Each client connection will have a thread on the server, and queries initiated by each connection will be executed in the corresponding separate thread.
Insert image description here
Second layer: MySQL's core service function layer, including query parsing, analysis, query cache, built-in functions, stored procedures, triggers, views, etc. The select operation will first check whether it hits the query cache, and if it hits the query cache, it will directly return the cached data, otherwise Parse the query and create the corresponding parse tree. As shown in the figure below, the parser will classify the commands into five modules: select, dml, ddl, rep, and status, and the contents will be processed by different modules.

The third layer: storage engine, responsible for data storage and retrieval. The MySQL server communicates with the storage engine through API, shielding the differences between various engines. Common storage engines include: InnoDB, MyISAM.

Guess you like

Origin blog.csdn.net/Nirvana92/article/details/128472794