diff --git a/develop/dev-guide-connect-to-tidb.md b/develop/dev-guide-connect-to-tidb.md index 88bb9db061bcf..7d1229bb0d4ff 100644 --- a/develop/dev-guide-connect-to-tidb.md +++ b/develop/dev-guide-connect-to-tidb.md @@ -9,9 +9,19 @@ TiDB is highly compatible with the MySQL protocol. For a full list of client lin TiDB supports the [MySQL Client/Server Protocol](https://dev.mysql.com/doc/internals/en/client-server-protocol.html), which allows most client drivers and ORM frameworks to connect to TiDB just as they connect to MySQL. -## MySQL Shell +You can choose to use MySQL Client or MySQL Shell based on your personal preferences. -You can connect to TiDB using MySQL Shell, which can be used as a command-line tool for TiDB. To install MySQL Shell, follow the instructions in the [MySQL Shell documentation](https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-install.html). After the installation, you can connect to TiDB using the following command: +## MySQL Client + +You can connect to TiDB using MySQL Client, which can be used as a command-line tool for TiDB. To install MySQL Client, follow the instructions below for YUM based Linux distributions. + +{{< copyable "shell-regular" >}} + +```shell +sudo yum install mysql +``` + +After the installation, you can connect to TiDB using the following command: {{< copyable "shell-regular" >}} @@ -19,9 +29,15 @@ You can connect to TiDB using MySQL Shell, which can be used as a command-line t mysql --host --port 4000 -u root -p --comments ``` -> **Note:** -> -> The MySQL Shell earlier than version 5.7.7 clears [Optimizer Hints](/optimizer-hints.md#optimizer-hints) by default. If you need to use the Hint syntax in an earlier MySQL Shell version, add the `--comments` option when starting the client. +## MySQL Shell + +You can connect to TiDB using MySQL Shell, which can be used as a command-line tool for TiDB. To install MySQL Shell, follow the instructions in the [MySQL Shell documentation](https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-install.html). After the installation, you can connect to TiDB using the following command: + +{{< copyable "shell-regular" >}} + +```shell +mysqlsh --sql mysql://root@:4000 +``` ## JDBC