Skip to content

Add support for Unix sockets on Windows #84

@matthewvalimaki

Description

@matthewvalimaki

On Windows 10 I have gcloud setup and working. I downloaded the binary and without any arguments (per Using automatic instance discovery with gcloud credentials) I saw:

2017/04/18 11:51:31 Using gcloud's active project: myproject-12345
2017/04/18 11:51:33 mkdir myproject-12345:us-central1:test: The filename, directory name, or volume label syntax is incorrect.
2017/04/18 11:51:33 errors parsing config:
        mkdir myproject-12345:us-central1:test: The filename, directory name, or volume label syntax is incorrect.

I guess this is to be expected as Windows does not support : in directory names, but perhaps by default the character should be - or changed for Windows specifically.

After changing the separator in code to - it worked but then I hit:

2017/04/18 11:58:57 Using gcloud's active project: myproject-12345
2017/04/18 11:58:59 errors parsing config:
        invalid "myproject-12345:us-central1:test": unsupported network: unix

And in code it specifically checks if OS is Windows and removes unix from supported list. I wonder if this could be default tcp on Windows?

In the end I got things to work with this: .\cloud_sql_proxy.exe -instances=myproject-12345:us-central1:test=tcp:5433.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions