Reputation: 11880
I installed the Google Cloud SDK (gcloud) on my Windows workstation several weeks back. I noticed that every time I run a command, I saw output similar to:
MySQL: command not found
... before the normal command begins. I assumed that the SDK detected that I have MySQL installed on my workstation, and was trying (in a very buggy manner) to hook into it for Cloud SQL support. It was annoying, but I didn't pay it much attention.
Today I ran a gcloud components update
command, and now the SDK is altogether non-functional. Apparently Google fixed the issue with the MySQL command's PATH
, as the SDK is successfully invoking mysql.exe
with every execution.
It's trying to connect with the MySQL user Utilities
, and prompting me for a password. Of course I have no idea what the password is supposed to be, since I didn't create this user.
I went into MySQL Workbench and set the password for this user to a known value, so that I can get past the password prompt triggered by the SDK. However, the problem now is that any gcloud
command that I type simply drops me into a MySQL shell session!
What the hell? I'm not sure why Cloud SDK is so insistent on accessing my local MySQL environment anyway. We do use Cloud SQL, but I have no particular interest in using gcloud
to manage it (particularly if it's buggy). I can't remove the Cloud SQL component from my local environment right now... because once again, any gcloud
command simply drops me into a MySQL shell. So I suppose my next step is to wipe the SDK off my workstation altogether, and attempt to install again without Cloud SQL selected. Why is any of this necessary at all?
Blowing away my Cloud SDK enviroment and re-installing did not make the problem go away. However, removing mysql.exe
from my system PATH
did. Apparently, the current version of Cloud SDK simply breaks right now (at least on Windows) when it detects MySQL in your path. I wonder how this made it past QA?
The output from gcloud info
is below (email address and current project ID redacted):
> gcloud info
Google Cloud SDK [0.9.67]
Platform: [Windows, x86_64]
Python Version: [2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)]]
Site Packages: [Disabled]
Installation Root: [C:\Program Files\Google\Cloud SDK\google-cloud-sdk]
Installed Components:
core: [2015.06.30]
bq-win: [2.0.18]
core-win: [2015.06.02]
gcloud: [2015.06.30]
windows-ssh-tools: [2015.06.02]
gcutil-msg: [2015.06.09]
gsutil: [4.13]
bq: [2.0.18]
preview: [2015.06.30]
gsutil-win: [4.12]
System PATH: [C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\bin\sdk;C:\Program Files\ConEmu;C:\Program Files\ConEmu\ConEmu;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Windows Azure Tools\Docker\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\Steve\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Git\cmd;C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin;C:\PROGRA~2\Groovy\GROOVY~1.3\bin;C:\Users\Steve\.dnx\runtimes\dnx-coreclr-win-x86.1.0.0-beta5\bin;C:\Users\Steve\.dnx\bin;C:\Dev\gradle-2.4\bin;C:\Users\Steve\AppData\Roaming\npm;C:\Users\Steve\AppData\Local\Code\bin;C:\Program Files\Boot2Docker for Windows]
Cloud SDK on PATH: [True]
Installation Properties: [C:\Program Files\Google\Cloud SDK\google-cloud-sdk\properties]
User Config Directory: [C:\Users\Steve\AppData\Roaming\gcloud]
User Properties: [C:\Users\Steve\AppData\Roaming\gcloud\properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]
Account: [...]
Project: [...]
Current Properties:
[core]
project: [...]
account: [...]
disable_usage_reporting: [False]
Logs Directory: [C:\Users\Steve\AppData\Roaming\gcloud\logs]
Last Log File: [C:\Users\Steve\AppData\Roaming\gcloud\logs\2015.07.06\11.43.23.734000.log]
Upvotes: 2
Views: 1112
Reputation: 991
I can't comment so will post as an answer.
You probably have some environmental variable set up in a way that confuses gcloud. Can you also post the output of set cloudsdk
from the command line? That should print all the environmental variables with the prefix "cloudsdk". You can redirect it to a file so it's easier to copy: set cloudsdk > environment_cloudsdk.txt
.
Not sure how this can happen. If the CLOUDSDK_ env vars are empty, and gcloud.cmd is correct, gcloud shouldn't touch mysql at all. "c:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd" lists at the top what each env var does. Make sure they are not set. Also when you reinstall Cloud SDK, make sure the directory "c:\Program Files\Google\Cloud SDK\" is properly deleted and that there's nothing in the PATH var about it.
Upvotes: 1