从 Google 数据流连接到 CloudSql
Connect to CloudSql from Google Dataflow
从 Google 数据流作业连接到 CloudSql 时
public String cnstr = "jdbc:google:mysql://xxx:zzz:yyy/dbname?user=root&password=****";
Connection conn = DriverManager.getConnection(cnstr);
PreparedStatement st = conn.prepareStatement(selectSql))
我收到这个错误:
No suitable driver found for jdbc:google:mysql://
有帮助吗?
我将连接字符串更改为
jdbc:mysql://0.0.0.0:3306/dbname?user=root&password=****
现在它运行良好;
从 Google 数据流作业连接到 CloudSql 时
public String cnstr = "jdbc:google:mysql://xxx:zzz:yyy/dbname?user=root&password=****";
Connection conn = DriverManager.getConnection(cnstr);
PreparedStatement st = conn.prepareStatement(selectSql))
我收到这个错误:
No suitable driver found for jdbc:google:mysql://
有帮助吗?
我将连接字符串更改为
jdbc:mysql://0.0.0.0:3306/dbname?user=root&password=****
现在它运行良好;