MySQL Architecture Analysis and workflow

Source: Internet
Author: User
The MySQL client sends a user connection request to the server, which is sent to the Connection Manager. The Connection Manager is a listener used to connect to the client.

The MySQL client sends a user connection request to the server, which is sent to the Connection Manager. The Connection Manager is a listener used to connect to the client.

MySQL Architecture

1. Supported interfaces: interfaces can be used to interact with MySQL in various languages.

2. Connection Pool:

MySQL workflow:

1. the MySQL client sends a user connection request to the server, which is sent to the Connection Manager. The Connection Manager is a listener used to connect to the client. After receiving the user request ,, A user request requires a thread, and the thread manager is responsible for creating a new thread for the user. After a user connects, the user needs to verify the user's permissions. The user module is responsible for managing the authentication.

2. after the connection, you can send SQL statements. Different statements are allocated to different parsers. This is done by the command distribution module. If a command is a query statement before distribution, if there is content in the cache, you can directly return the result to the user, so it may also interact with the cache module. When the user sends a command to request resources, it will be recorded in the log, the command distribution module can also interact with the Log Module.

3. if no result is required in the cache, the command is distributed to the parser to determine which statement the command belongs to. If it is a select statement, it is optimized by the optimizer. If it is an update statement, the insert and delete statements are handed over to the table definition module. No matter which module, the user must check whether the operation is completed. Therefore, these commands are handed over to the access control module, it is used to check whether the client user's operations have sufficient operation permissions to execute request operations. If no problem is found after the access module check, these command statements are handed over to another component table manager, the table manager is responsible for creating, reading, or modifying table definition files. The table manager is handed over to the storage engine (the storage engine Interface), and the storage engine is handed over to the core --> MYISAM or INnoDB

Related reading:

MySQL Architecture

MySQL MYISAM engine optimized by Changing Column default values

MySQL MYISAM engine does not support transactions

MySQL MYISAM Table concurrency

MySQL database cleanup MYISAM Innodb table

Differences between MYISAM and InnoDB in MySQL

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.