{"record":{"id":"9d06505e499b14de","repo":"vitessio/vitess","slug":"unix-sockets-are-not-supported-on-windows","errorCode":null,"errorMessage":"unix sockets are not supported on windows","messagePattern":"unix sockets are not supported on windows","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vtgate/plugin_mysql_server_windows.go","lineNumber":28,"sourceCode":"    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage vtgate\n\nimport (\n\t\"errors\"\n\n\t\"vitess.io/vitess/go/mysql\"\n)\n\nfunc setupUnixSocket(srv *mysqlServer, authServer mysql.AuthServer, path string) error {\n\treturn errors.New(\"unix sockets are not supported on windows\")\n}\n","sourceCodeStart":10,"sourceCodeEnd":30,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtgate/plugin_mysql_server_windows.go#L10-L30","documentation":"vtgate's MySQL server protocol listener supports unix sockets only on Unix-like platforms. On Windows, the build-tagged setupUnixSocket stub immediately returns this error because unix sockets are unavailable.","triggerScenarios":"Starting vtgate on Windows with the mysql server unix socket path flag set (e.g. --mysql_auth_unix_socket or the unix socket config), causing setupUnixSocket to be invoked.","commonSituations":"Running Vitess servers on Windows for development with a config copied from a Linux deployment that enables unix socket listeners.","solutions":["Remove the unix socket configuration and use a TCP listener instead on Windows","Run vtgate on Linux if unix socket protocol support is required","Point clients at the TCP port (mysql_host/mysql_port) rather than the socket path"],"exampleFix":"// before\nvtgate --mysql_server_unix_socket /tmp/vtgate.sock ...\n// after\nvtgate --mysql_server_port 15306 ...","handlingStrategy":"validation","validationCode":"if runtime.GOOS == \"windows\" && unixSocketPath != \"\" {\n    return errors.New(\"unix sockets unsupported on windows; use TCP\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only configure unix sockets on Linux/macOS deployments","Use GOOS-specific config templates for cross-platform setups","Check platform docs before enabling unix socket listeners"],"tags":["vtgate","windows","unix-socket","platform"],"backgroundTag":"unix-socket-not-supported-on-windows","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}