From a7071031dac3229f63573037e445cce0ec16ac15 Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Sat, 23 Oct 2021 18:46:12 -0600 Subject: [PATCH] added windows check --- tidb-server/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tidb-server/main.go b/tidb-server/main.go index ccf1013319bd0..a660314c14411 100644 --- a/tidb-server/main.go +++ b/tidb-server/main.go @@ -527,6 +527,13 @@ func overrideConfig(cfg *config.Config) { if actualFlags[nmInitializeInsecure] { cfg.Security.SecureBootstrap = !*initializeInsecure } + // Secure bootstrap initializes with Socket authentication + // which is not supported on windows. Only the insecure bootstrap + // method is supported. + if runtime.GOOS == "windows" && cfg.Security.SecureBootstrap { + err = fmt.Errorf("the option --initialize-secure is not supported on Windows") + terror.MustNil(err) + } } func setGlobalVars() {