From 3b855e33b512c40ca9498ed2ad93aa2abcd33a1f 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 7a59e80716b8b..4565ef87998fd 100644 --- a/system-variables.md +++ b/system-variables.md @@ -211,6 +211,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 1d3141f432ca80491fb940f22f3aebb6e51a44cc 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 4565ef87998fd..30933ea1d0ccf 100644 --- a/system-variables.md +++ b/system-variables.md @@ -215,18 +215,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