# Connection Process for Database Users

__*TiDB connection process*__
__*zz-BGL*__

![`smart`](./student-guide/diagram/DatabaseUserConnectionProcess_aa_004_20231010.png)
-------------------------------------------------------------
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. This is generally the username/password or connection key authentication. If authentication fails, then the user's connection will be It will be rejected, and the connection will be disconnected. If the authentication is successful, then proceed to the next step.

The next step is to perform 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 fails, the operation is denied, and if successful, the user operation is executed normally.