擅长:python、mysql、java
<p>根据python代码的宿主位置,您需要允许应用服务器访问云sql。你知道吗</p>
<blockquote>
<p>You can connect to a Cloud SQL instance using the following methods:</p>
<ol>
<li>By using the proxy (Second Generation instances only)</li>
<li>By configuring access for one or more public IP addresses</li>
<li>By using the JDBC Socket Factory (for the Java programming language, Second Generation instances only)</li>
<li>By using the Cloud SQL Proxy library (for the Go programming language, Second Generation instances only)</li>
</ol>
</blockquote>
<p>请查看以下链接,该链接描述了供您连接的选项:
<a href="https://cloud.google.com/sql/docs/mysql/connect-external-app" rel="nofollow noreferrer">https://cloud.google.com/sql/docs/mysql/connect-external-app</a></p>