The basic architecture of MySQL

MySQL can be divided into Server layer and storage engine layer. Let’s step through the Server layer.

The connector

First, the Server layer has a connector. Connectors are responsible for establishing connections with clients, obtaining permissions, and maintaining and managing connections. During login, if the user name and password are authenticated, the connector will check the permissions in the permission table. After that, the permissions in the connection are determined by the logical read even depending on the permissions read at that time.

You can use the show processList command to see the status of the connection. The wait_timeout parameter controls the client disconnection time.

If you use all long connections, MySQL memory will grow significantly over time. Memory temporarily used during MySQL execution is managed within the connection object and is released only when the connection is disconnected.

The query cache