Feb 17, 2017 2:55:57 AM com.google.cloud.sql.mysql.SocketFactory connect
INFO: Connecting to Cloud SQL instance [xx1:xx2:xx3].
Feb 17, 2017 2:55:57 AM com.google.cloud.sql.mysql.SslSocketFactory getInstance
INFO: First Cloud SQL connection, generating RSA key pair.
===========================
CM25 == > The Application Default Credentials are not available. They are available if running on Google App Engine, Google Compute Engine, or Google Cloud Shell. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See
https://developers.google.com/accounts/docs/application-default-credentials for more information.
===========================
Feb 17, 2017 2:56:07 AM com.google.cloud.sql.mysql.example.ListTables koneksi
SEVERE: null
java.sql.SQLNonTransientConnectionException: Could not create connection to database server.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:676)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:638)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:606)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:1837)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1653)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:662)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:352)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:221)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at com.google.cloud.sql.mysql.example.ListTables.koneksi(ListTables.java:46)
at com.google.cloud.sql.mysql.example.ListTables.<init>(ListTables.java:23)
at com.google.cloud.sql.mysql.example.ListTables.main(ListTables.java:65)
Caused by: java.lang.RuntimeException: Unable to obtain credentials to communicate with the Cloud SQL API
at com.google.cloud.sql.mysql.SslSocketFactory$ApplicationDefaultCredentialFactory.create(SslSocketFactory.java:543)
at com.google.cloud.sql.mysql.SslSocketFactory.getInstance(SslSocketFactory.java:133)
at com.google.cloud.sql.mysql.SocketFactory.connect(SocketFactory.java:39)
at com.mysql.cj.mysqla.io.MysqlaSocketConnection.connect(MysqlaSocketConnection.java:57)
at com.mysql.cj.mysqla.MysqlaSession.connect(MysqlaSession.java:144)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:1783)
... 9 more
Caused by: java.io.IOException: The Application Default Credentials are not available. They are available if running on Google App Engine, Google Compute Engine, or Google Cloud Shell. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See
https://developers.google.com/accounts/docs/application-default-credentials for more information.
at com.google.api.client.googleapis.auth.oauth2.DefaultCredentialProvider.getDefaultCredential(DefaultCredentialProvider.java:98)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.getApplicationDefault(GoogleCredential.java:213)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.getApplicationDefault(GoogleCredential.java:191)
at com.google.cloud.sql.mysql.SslSocketFactory$ApplicationDefaultCredentialFactory.create(SslSocketFactory.java:538)
... 14 more
Koneksi Gagal : Could not create connection to database server.