From 15cb467418a8a5355fb6797a97d4d0cb4ea5e940 Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Wed, 15 Sep 2021 10:20:25 -0600 Subject: [PATCH 1/2] system-variables: add skip-name-resolve --- system-variables.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/system-variables.md b/system-variables.md index 5ff123d7570c1..453b29d772e53 100644 --- a/system-variables.md +++ b/system-variables.md @@ -212,6 +212,23 @@ mysql> SELECT * FROM t1; - Range: `[0, 65535]` - The port that the `tidb-server` is listening on when speaking the MySQL protocol. +### skip_name_resolve New in v5.2.0 + +- Scope: GLOBAL +- Default value: `OFF` +- This controls if the `tidb-server` should resolve hostnames as part of the connection handshake. +- Enabling this option is useful as a performance optimization when DNS is unreliable. + +> **Note:** +> +> When `skip_name_resolve=ON`, users with a hostname in their identity will no longer be able to log in. i.e. +> +> ```sql +> CREATE USER 'appuser'@'apphost' IDENTIFIED BY 'app-password'; +> ``` +> +> In this example, it is recommended to replace _apphost_ with an IP address or wildcard (`%`). + ### socket - Scope: NONE From 04b0043ada0284118f255dc545def892f46118f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Wed, 29 Sep 2021 14:53:38 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- system-variables.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system-variables.md b/system-variables.md index 453b29d772e53..5dc8db976c7af 100644 --- a/system-variables.md +++ b/system-variables.md @@ -216,18 +216,18 @@ mysql> SELECT * FROM t1; - Scope: GLOBAL - Default value: `OFF` -- This controls if the `tidb-server` should resolve hostnames as part of the connection handshake. -- Enabling this option is useful as a performance optimization when DNS is unreliable. +- This variable controls whether the `tidb-server` instance resolves hostnames as a part of the connection handshake. +- When the DNS is unreliable, you can enable this option to improve network performance. > **Note:** > -> When `skip_name_resolve=ON`, users with a hostname in their identity will no longer be able to log in. i.e. +> When `skip_name_resolve=ON`, users with a hostname in their identity will no longer be able to log into the server. For example: > > ```sql > CREATE USER 'appuser'@'apphost' IDENTIFIED BY 'app-password'; > ``` > -> In this example, it is recommended to replace _apphost_ with an IP address or wildcard (`%`). +> In this example, it is recommended to replace `apphost` with an IP address or the wildcard (`%`). ### socket