vitessio/vitess · error
unix sockets are not supported on windows
Error message
unix sockets are not supported on windows
What it means
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.
Source
Thrown at go/vt/vtgate/plugin_mysql_server_windows.go:28
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package vtgate
import (
"errors"
"vitess.io/vitess/go/mysql"
)
func setupUnixSocket(srv *mysqlServer, authServer mysql.AuthServer, path string) error {
return errors.New("unix sockets are not supported on windows")
}
View on GitHub (pinned to 01a25a7d17)
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
Example fix
// before vtgate --mysql_server_unix_socket /tmp/vtgate.sock ... // after vtgate --mysql_server_port 15306 ...
Defensive patterns
Strategy: validation
Validate before calling
if runtime.GOOS == "windows" && unixSocketPath != "" {
return errors.New("unix sockets unsupported on windows; use TCP")
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Running Vitess servers on Windows for development with a config copied from a Linux deployment that enables unix socket listeners.
Related errors
- syslog is not supported on windows
- cell mode should be handled by the gateway, not the balancer
- both the dry-run mode and actual buffering is enabled. To av
- Binary.ReverseMap: keyspaceId is nil
- 1105
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/9d06505e499b14de.
Report an issue: GitHub.