{"record":{"id":"9e70c950352350d1","repo":"go-sql-driver/mysql","slug":"invalid-value-unknown-config-name-s","errorCode":null,"errorMessage":"invalid value / unknown config name: %s","messagePattern":"invalid value / unknown config name: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dsn.go","lineNumber":210,"sourceCode":"\t} else if cfg.Net == \"tcp\" {\n\t\tcfg.Addr = ensureHavePort(cfg.Addr)\n\t}\n\n\tif cfg.TLS == nil {\n\t\tswitch cfg.TLSConfig {\n\t\tcase \"false\", \"\":\n\t\t\t// don't set anything\n\t\tcase \"true\":\n\t\t\tcfg.TLS = &tls.Config{}\n\t\tcase \"skip-verify\":\n\t\t\tcfg.TLS = &tls.Config{InsecureSkipVerify: true}\n\t\tcase \"preferred\":\n\t\t\tcfg.TLS = &tls.Config{InsecureSkipVerify: true}\n\t\t\tcfg.AllowFallbackToPlaintext = true\n\t\tdefault:\n\t\t\tcfg.TLS = getTLSConfigClone(cfg.TLSConfig)\n\t\t\tif cfg.TLS == nil {\n\t\t\t\treturn errors.New(\"invalid value / unknown config name: \" + cfg.TLSConfig)\n\t\t\t}\n\t\t}\n\t}\n\n\tif cfg.TLS != nil && cfg.TLS.ServerName == \"\" && !cfg.TLS.InsecureSkipVerify {\n\t\thost, _, err := net.SplitHostPort(cfg.Addr)\n\t\tif err == nil {\n\t\t\tcfg.TLS.ServerName = host\n\t\t}\n\t}\n\n\tif cfg.ServerPubKey != \"\" {\n\t\tcfg.pubKey = getServerPubKey(cfg.ServerPubKey)\n\t\tif cfg.pubKey == nil {\n\t\t\treturn errors.New(\"invalid value / unknown server pub key name: \" + cfg.ServerPubKey)\n\t\t}\n\t}\n","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/go-sql-driver/mysql/blob/03d76c7e07908e255ce62d126d07ede3f2365d86/dsn.go#L192-L228","documentation":"Error \"invalid value / unknown config name: %s\" thrown in go-sql-driver/mysql.","triggerScenarios":"The DSN sets tls=<value> to a name that is not 'true', 'false', 'skip-verify', 'preferred', or a TLS config previously registered with mysql.RegisterTLSConfig.","commonSituations":"Typo in the tls parameter, or using a custom TLS config name without calling mysql.RegisterTLSConfig(name, config) before opening the connection. Register the config or use one of the built-in values.","solutions":["Use a registered TLS config name in tls=<name>, or one of the built-in values: true, false, skip-verify, preferred.","Register your custom TLS config first with mysql.RegisterTLSConfig(name, tlsConfig) before opening the connection."],"exampleFix":"mysql.RegisterTLSConfig(\"custom\", &tls.Config{RootCAs: roots})\ndsn := \"user:pass@tcp(dbhost:3306)/mydb?tls=custom\"","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"03d76c7e07908e255ce62d126d07ede3f2365d86","analyzedAt":"2026-08-07T10:39:17.340Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}