# Connection Procedures for Database Users

__*TiDB connection process*__

![left](./student-guide/diagram/DatabaseUserConnectionProcess_en_001_20220620.png)
-------------------------------------------------------------
The following figure is the flow chart of a user connecting to a database. From the diagram, we can see that the first time a user connects to the database, they will go through the first step of privilege management: authentication (authentication). This is generally the username/password or connection key authentication. If authentication (authentication) fails, then the user's connection will be It will be rejected, and the connection will be disconnected. If the authentication (authentication) is successful, then proceed to the next step.
        The next step is to perform authorization (authorization) before the user starts querying. Authorization determines whether the user has privilege to operate related objects such as tables, indexes, or views. If authorization (authorization) fails, the operation is denied, and if successful, the user operation is executed normally.