在 Windows 64 位上安装 Cloud SQL 代理时出现问题 [英] Problems installing Cloud SQL Proxy on Windows 64-bit

查看:43
本文介绍了在 Windows 64 位上安装 Cloud SQL 代理时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 Windows 10 64 位操作系统上安装适用于 Google Cloud Platform 的 Cloud SQL 代理,以便我可以使用 Python 脚本将数据转储到 SQL.我正在关注本指南 进行设置.

I'm trying to install Cloud SQL Proxy for Google Cloud Platform on my Windows 10 64 bit OS, so I can use Python scripts to dump data into SQL. I'm following this guide to get it set up.

我从控制台创建了一个项目和一个 Google Cloud SQL 实例,没有任何问题,并且它在 SDK shell 中显示出来没有任何问题.下载代理安装程序并安装后,会打开一个对话框窗口,然后在我阅读它之前关闭.

I created a project and a Google Cloud SQL instance from the Console without any issues, and it shows up in the SDK shell without any problems. After downloading the proxy installer and installing it, a dialog window opens up and then closes before I can read it.

当我转到 Google Cloud SDK shell 并尝试使用以下命令启动 Cloud SQL 代理时:cloud_sql_proxy.exe -instances="[MyInstanceConnectionName]"=tcp:3306

When I go to the Google Cloud SDK shell and try to start the Cloud SQL Proxy with: cloud_sql_proxy.exe -instances="[MyInstanceConnectionName]"=tcp:3306

无论我尝试多少次,它都会抛出错误Cloud Sql Proxy 未被识别为内部或外部命令、可运行的程序或批处理文件."我已经尝试重新下载并重新执行该文件,但它仍然无法正常工作.

No matter how many times I try, it throws the error "Cloud Sql Proxy is not recognized as an internal or external command, operable program or batch file." I already tried re-downloading and re-executing the file but it still won't work.

我在 64 位 Windows 10 上安装了带有 Anaconda 和 Google Cloud SDK shell 的 Python 3.6.

I have Python 3.6 with Anaconda and Google Cloud SDK shell installed on Windows 10 64-bit.

推荐答案

当您下载 cloud_sql_proxy 文件时,请确保按照操作指南中的说明对其进行重命名.还要确保将它保存在运行它的根目录中.例如.如果您从 C:/users/desktop>.cloud_sql_proxy.exe -instances="[YOUR_INSTANCE_CONNECTION_NAME]"=tcp:3306 运行命令,则 cloud_Sql_proxy 文件必须位于根 C 驱动器中.

When you download the cloud_sql_proxy file make sure to rename it as per instructions in the how to guide. Also make sure you save it in the root directory of where you will run it from. E.g. If you are running the command from C:/users/desktop>.cloud_sql_proxy.exe -instances="[YOUR_INSTANCE_CONNECTION_NAME]"=tcp:3306 then the cloud_Sql_proxy file must be located in the root C drive.

这篇关于在 Windows 64 位上安装 Cloud SQL 代理时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆