Skip to content

Commit ad3e178

Browse files
authored
Correct MySQL Shell/Client section (#8779) (#10947)
1 parent 925cb1e commit ad3e178

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

develop/dev-guide-connect-to-tidb.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,35 @@ TiDB is highly compatible with the MySQL protocol. For a full list of client lin
99

1010
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.
1111

12-
## MySQL Shell
12+
You can choose to use MySQL Client or MySQL Shell based on your personal preferences.
1313

14-
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:
14+
## MySQL Client
15+
16+
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.
17+
18+
{{< copyable "shell-regular" >}}
19+
20+
```shell
21+
sudo yum install mysql
22+
```
23+
24+
After the installation, you can connect to TiDB using the following command:
1525

1626
{{< copyable "shell-regular" >}}
1727

1828
```shell
1929
mysql --host <tidb_server_host> --port 4000 -u root -p --comments
2030
```
2131

22-
> **Note:**
23-
>
24-
> 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.
32+
## MySQL Shell
33+
34+
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:
35+
36+
{{< copyable "shell-regular" >}}
37+
38+
```shell
39+
mysqlsh --sql mysql://root@<tidb_server_host>:4000
40+
```
2541

2642
## JDBC
2743

0 commit comments

Comments
 (0)