From 9c5b6c63b45c71a1417f425580e532f89ceee600 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 14 Jul 2020 19:38:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=8B=A5=E8=A6=81=E4=BD=BF=E7=94=A8=20MySQ?= =?UTF-8?q?L=208.0=20=E7=9A=84=E8=BF=9E=E6=8E=A5=E5=99=A8=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E5=88=B0=20TiDB=EF=BC=8C=E4=BD=A0=E5=BF=85=E9=A1=BB?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=9C=B0=E6=8C=87=E5=AE=9A=20`default-auth?= =?UTF-8?q?=3Dmysql=5Fnative=5Fpassword`=EF=BC=8C=E5=9B=A0=E4=B8=BA=20`mys?= =?UTF-8?q?ql=5Fnative=5Fpassword`=20=E4=B8=8D=E5=86=8D=E6=98=AF[=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E7=9A=84=E6=8F=92=E4=BB=B6](https://dev.mysql.com/doc?= =?UTF-8?q?/refman/8.0/en/upgrading-from-previous-series.html#upgrade-cach?= =?UTF-8?q?ing-sha2-password)=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- connectors-and-apis.md | 4 ++++ security-compatibility-with-mysql.md | 1 + tidb-specific-system-variables.md | 2 +- user-account-management.md | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/connectors-and-apis.md b/connectors-and-apis.md index d53b5ec413f3..06869f0e58e2 100644 --- a/connectors-and-apis.md +++ b/connectors-and-apis.md @@ -24,6 +24,10 @@ TiDB 兼容 MySQL(5.6、5.7) 的所有连接器和 API,包括: + [MySQL Eiffel Wrapper](https://dev.mysql.com/doc/refman/5.7/en/apis-eiffel.html) + [Mysql Go API](https://github.com/go-sql-driver/mysql) +> **注意:** +> +> 若要使用 MySQL 8.0 的连接器连接到 TiDB,你必须显示地指定 `default-auth=mysql_native_password`,因为 `mysql_native_password` 不再是[默认的插件](https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password)。 + ## 使用 MySQL 连接器连接 TiDB Oracle 官方提供了以下 API,TiDB 可以兼容所有这些 API。 diff --git a/security-compatibility-with-mysql.md b/security-compatibility-with-mysql.md index 0ef2e1280cad..9fe468768970 100644 --- a/security-compatibility-with-mysql.md +++ b/security-compatibility-with-mysql.md @@ -9,6 +9,7 @@ aliases: ['/docs-cn/dev/reference/security/compatibility/'] 除以下功能外,TiDB 支持与 MySQL 5.7 类似的安全特性。 - 仅支持 `mysql_native_password` 密码验证或证书验证登陆方案。 + - MySQL 8.0 中,`mysql_native_password` 不再是[默认/推荐的插件](https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password)。若要使用 MySQL 8.0 的连接器连接到 TiDB,你必须显示地指定 `default-auth=mysql_native_password`。 - 不支持外部身份验证方式(如 LDAP)。 - 不支持列级别权限设置。 - 不支持密码过期,最后一次密码变更记录以及密码生存期。[#9709](https://github.com/pingcap/tidb/issues/9709) diff --git a/tidb-specific-system-variables.md b/tidb-specific-system-variables.md index d6c89e91a56e..b9e2d9eacf1e 100644 --- a/tidb-specific-system-variables.md +++ b/tidb-specific-system-variables.md @@ -363,7 +363,7 @@ mysql> desc select count(distinct a) from test.t; 这个变量用来给 TiDB 的 `backoff` 最大时间增加权重,即内部遇到网络或其他组件(TiKV、PD)故障等时,发送重试请求的最大重试时间。可以通过这个变量来调整最大重试时间,最小值为 1。 -例如,TiDB 向 PD 取 TSO 的基础超时时间是 15 秒,当 `tidb_backoff_weight = 2` 时,取 TSO 的最大超时时间为:基础时间 * 2 等于 30 秒。 +例如,TiDB 向 PD 取 TSO 的基础超时时间是 15 秒,当 `tidb_backoff_weight = 2` 时,取 TSO 的最大超时时间为:基础时间 \* 2 等于 30 秒。 在网络环境较差的情况下,适当增大该变量值可以有效缓解因为超时而向应用端报错的情况;而如果应用端希望更快地接到报错信息,则应该尽量减小该变量的值。 diff --git a/user-account-management.md b/user-account-management.md index fe263d4eacf2..833bd2216de8 100644 --- a/user-account-management.md +++ b/user-account-management.md @@ -28,6 +28,10 @@ mysql --port 4000 --user xxx --password mysql -P 4000 -u xxx -p ``` +> **Note:** +> +> 若要使用 MySQL 8.0 的连接器连接到 TiDB,你必须显示地指定 `default-auth=mysql_native_password`,因为 `mysql_native_password` 不再是[默认的插件](https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password)。 + ## 添加用户 添加用户有两种方式: From a34c4468d3e320cd47f96c3e835f982bc23be2a0 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Fri, 17 Jul 2020 13:31:28 +0800 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- connectors-and-apis.md | 2 +- security-compatibility-with-mysql.md | 2 +- user-account-management.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/connectors-and-apis.md b/connectors-and-apis.md index 06869f0e58e2..83c1517f84b4 100644 --- a/connectors-and-apis.md +++ b/connectors-and-apis.md @@ -26,7 +26,7 @@ TiDB 兼容 MySQL(5.6、5.7) 的所有连接器和 API,包括: > **注意:** > -> 若要使用 MySQL 8.0 的连接器连接到 TiDB,你必须显示地指定 `default-auth=mysql_native_password`,因为 `mysql_native_password` 不再是[默认的插件](https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password)。 +> 若要使用 MySQL 8.0 的连接器连接到 TiDB,你必须显式地指定 `default-auth=mysql_native_password`,因为 `mysql_native_password` 不再是[默认的插件](https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password)。 ## 使用 MySQL 连接器连接 TiDB diff --git a/security-compatibility-with-mysql.md b/security-compatibility-with-mysql.md index 9fe468768970..5c3c0035146c 100644 --- a/security-compatibility-with-mysql.md +++ b/security-compatibility-with-mysql.md @@ -9,7 +9,7 @@ aliases: ['/docs-cn/dev/reference/security/compatibility/'] 除以下功能外,TiDB 支持与 MySQL 5.7 类似的安全特性。 - 仅支持 `mysql_native_password` 密码验证或证书验证登陆方案。 - - MySQL 8.0 中,`mysql_native_password` 不再是[默认/推荐的插件](https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password)。若要使用 MySQL 8.0 的连接器连接到 TiDB,你必须显示地指定 `default-auth=mysql_native_password`。 + - MySQL 8.0 中,`mysql_native_password` 不再是[默认/推荐的插件](https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password)。若要使用 MySQL 8.0 的连接器连接到 TiDB,你必须显式地指定 `default-auth=mysql_native_password`。 - 不支持外部身份验证方式(如 LDAP)。 - 不支持列级别权限设置。 - 不支持密码过期,最后一次密码变更记录以及密码生存期。[#9709](https://github.com/pingcap/tidb/issues/9709) diff --git a/user-account-management.md b/user-account-management.md index 833bd2216de8..5b71b79fe9b2 100644 --- a/user-account-management.md +++ b/user-account-management.md @@ -30,7 +30,7 @@ mysql -P 4000 -u xxx -p > **Note:** > -> 若要使用 MySQL 8.0 的连接器连接到 TiDB,你必须显示地指定 `default-auth=mysql_native_password`,因为 `mysql_native_password` 不再是[默认的插件](https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password)。 +> 若要使用 MySQL 8.0 的连接器连接到 TiDB,你必须显式地指定 `default-auth=mysql_native_password`,因为 `mysql_native_password` 不再是[默认的插件](https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password)。 ## 添加用户