All Projects → GoogleCloudPlatform → Cloud Sql Jdbc Socket Factory

GoogleCloudPlatform / Cloud Sql Jdbc Socket Factory

Licence: apache-2.0

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Cloud Sql Jdbc Socket Factory

Rxdownloader
- Reactive Extension Library for Android to download files
Stars: ✭ 40 (-70.37%)
Mutual labels:  libraries
Symbol Instance Sheet
Generate a sheet of symbol instances from your current document or a library.
Stars: ✭ 72 (-46.67%)
Mutual labels:  libraries
Golibs
general purpose Golang code (to be included in other projects)
Stars: ✭ 114 (-15.56%)
Mutual labels:  libraries
Inqlude Data
Library meta data for independent Qt library archive
Stars: ✭ 44 (-67.41%)
Mutual labels:  libraries
Ultimate Resources Android Devs
Compiled & Curated List of Resources for Android Developers
Stars: ✭ 68 (-49.63%)
Mutual labels:  libraries
Minio Go
MinIO Client SDK for Go
Stars: ✭ 1,231 (+811.85%)
Mutual labels:  libraries
Appdepends Ios
🔍 搜集热门APP,列举其所依赖和使用的开源库。
Stars: ✭ 27 (-80%)
Mutual labels:  libraries
Pyms
Library of utils to create REST Python Microservices
Stars: ✭ 120 (-11.11%)
Mutual labels:  libraries
Vitamin Web
Decathlon Design System libraries for web applications
Stars: ✭ 70 (-48.15%)
Mutual labels:  libraries
Gsf
Grid Solutions Framework
Stars: ✭ 106 (-21.48%)
Mutual labels:  libraries
Turkishid
Validator/generator for Turkish Republic Citizen ID numbers (TC Kimlik No)
Stars: ✭ 49 (-63.7%)
Mutual labels:  libraries
Version Checker Gradle Lint
Warning on new versions available even when using Kotlin-DSL plugin.
Stars: ✭ 68 (-49.63%)
Mutual labels:  libraries
Rust Game Development Frameworks
List of curated frameworks by the **Game Development in Rust** community.
Stars: ✭ 81 (-40%)
Mutual labels:  libraries
Django Icekit
GLAMkit is a next-generation Python CMS by the Interaction Consortium, designed especially for the cultural sector.
Stars: ✭ 42 (-68.89%)
Mutual labels:  libraries
Awesome Cl
A curated list of awesome Common Lisp frameworks, libraries and other shiny stuff.
Stars: ✭ 1,736 (+1185.93%)
Mutual labels:  libraries
Bit
Bitcoin made easy.
Stars: ✭ 958 (+609.63%)
Mutual labels:  libraries
Awesome Hpp
A curated list of awesome header-only C++ libraries
Stars: ✭ 1,198 (+787.41%)
Mutual labels:  libraries
Awesome Sweden
A curated list of awesome things to use when coding for the Swedish market.
Stars: ✭ 124 (-8.15%)
Mutual labels:  libraries
Awesome Gleam
💯 A collection of Gleam libraries, projects, and resources
Stars: ✭ 120 (-11.11%)
Mutual labels:  libraries
Alexandra
Python toolkit for writing Amazon Echo skills as web services
Stars: ✭ 90 (-33.33%)
Mutual labels:  libraries

Cloud SQL Connector for Java

CI Java 8 CI Java 11

The Cloud SQL Connector for Java is a library that provides IAM-based authorization and encryption when connecting to a Cloud SQL instance. It can not provide a network path to a Cloud SQL instance if one is not already present. See the Connecting Overview page for more information on connecting to a Cloud SQL instance.

Usage

For usage information specific to your database engine and driver, see the pages below:

JDBC:

R2DBC:

For examples of this library being used in the context of an application, check out the sample applications located here.

Authentication

This library uses Application Default Credentials to authenticate the connection to the Cloud SQL server. For more details, see the previously mentioned link.

To activate credentials locally, use the following gcloud command:

gcloud auth application-default login

Building the Drivers

To build a fat JAR containing the JDBC driver with the bundles Socket Factory dependencies you can issue the following Maven command from the location containing the project pom.xml:

mvn -P jar-with-dependencies clean package -DskipTests

This will create a target sub-folder within each of the module directories. Within these target directories you'll find the JDBC driver files.

Example:

mysql-socket-factory-connector-j-8–1.2.1-jar-with-dependencies.jar
postgres-socket-factory-1.2.1-jar-with-dependencies.jar

Firewall configuration

The Cloud SQL proxy establishes connections to Cloud SQL instances using port 3307. Applications that are protected by a firewall may need to be configured to allow outgoing connections on TCP port 3307. A connection blocked by a firewall typically results in an error stating connection failure (e.g. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure).

Connect with IntelliJ

In order to connect IntelliJ to your Cloud SQL instance, you will need to add this library as a jar with dependencies in "Additional Files" section on the driver settings page. Prebuilt fat jars can be found on the Releases page for this purpose.

Troubleshooting

Here are some troubleshooting tips to resolve common issues that come up when using the Java Connector:

  1. Make sure you are using the latest version of the Cloud SQL Connector and your database driver to avoid incompatibilities. Some older versions of drivers are not supported
  2. The Java connector provides authorization for connections, but it does not provide new paths to connectivity. For example, in order to connect to a Cloud SQL instance using a Private IP address, your application must already have VPC access.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].