Connect to CloudSql from Google Dataflow

When connecting to CloudSql from a Google Dataflow job

public String cnstr = "jdbc:google:mysql://xxx:zzz:yyy/dbname?user=root&password=****";
Connection conn = DriverManager.getConnection(cnstr);
                PreparedStatement st = conn.prepareStatement(selectSql))

I got this error:

No suitable driver found for jdbc:google:mysql://

Any help?

+4
source share
1 answer

I change the connection string to

jdbc:mysql://0.0.0.0:3306/dbname?user=root&password=****

And now it works great;

+4
source

Source: https://habr.com/ru/post/1661844/


All Articles