# Joins

__*TiDB connection*__

+ To connect to the server where TiDB Server is located from a remote machine using a mysql client, you need to specify the server address and port number of the TiDB server as well as the username and password:
  + `mysql -u username -ppassword -h servername -P port`

![left](./student-guide/diagram/RemoteConnection_en_001_20220620.png)
-------------------------------------------------------------
Remote connection means that the client and the server where the database is located are not on the same host. At this time, we need to specify the address and port number of the remote server.

Here we need to distinguish between two addresses (host name), one is the address defined in the mysql. user table. This address refers to the machine where the user client is located. Generally, it does not refer to the database, so it is called the client address. The other is the server address where the database is located. This is what we need to specify when connecting.