From ee6f6b8b6480b75ae04fc9acce28d97024d10a57 Mon Sep 17 00:00:00 2001 From: Aolin Date: Mon, 13 Feb 2023 19:25:42 +0800 Subject: [PATCH] dev guide: use SimpleTab to describe two MySQL clients Signed-off-by: Aolin --- develop/dev-guide-connect-to-tidb.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/develop/dev-guide-connect-to-tidb.md b/develop/dev-guide-connect-to-tidb.md index 148f92bd0cc48..e36804c067079 100644 --- a/develop/dev-guide-connect-to-tidb.md +++ b/develop/dev-guide-connect-to-tidb.md @@ -9,9 +9,13 @@ 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 + You can choose to use MySQL Client or MySQL Shell based on your personal preferences. -## 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. @@ -25,7 +29,9 @@ After the installation, you can connect to TiDB using the following command: mysql --host --port 4000 -u root -p --comments ``` -## 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: @@ -33,6 +39,10 @@ You can connect to TiDB using MySQL Shell, which can be used as a command-line t mysqlsh --sql mysql://root@:4000 ``` +
+ +
+ ## JDBC You can connect to TiDB using the [JDBC](https://dev.mysql.com/doc/connector-j/8.0/en/) driver. To do that, you need to create a `MysqlDataSource` or `MysqlConnectionPoolDataSource` object (both objects support the `DataSource` interface), and then set the connection string using the `setURL` function.