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

  1. Remove the unix socket configuration and use a TCP listener instead on Windows
  2. Run vtgate on Linux if unix socket protocol support is required
  3. 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

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


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/9d06505e499b14de. Report an issue: GitHub.