且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Java连接到Google Cloud SQL

更新时间:2022-06-26 09:40:00

自述文件中针对回购.

一些潜在的跳闸点:

  1. 使用应用程序默认凭据提供工厂凭证.

确保已为项目启用 Cloud SQL API (并且,如果您使用的是服务帐户,请确保具有 Cloud SQL Client 角色).

Make sure you have the Cloud SQL API enabled to your project (and if you are using a service account, make sure to have the Cloud SQL Client role added to it).

将库添加为

Add the library as a dependency in your POM or gradlefile.

确保防火墙在端口3307上允许Cloud SQL实例通过.

Make sure your firewall allows out on port 3307 to your Cloud SQL instance.