Google cloud platform 从Google数据流连接到CloudSql
从Google数据流作业连接到CloudSql时Google cloud platform 从Google数据流连接到CloudSql,google-cloud-platform,google-cloud-sql,google-cloud-dataflow,Google Cloud Platform,Google Cloud Sql,Google Cloud 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)) 我
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=****
现在它工作得很好 谢谢。但是您的答案是针对appengine,而我正在数据流作业中运行代码,因此您的解决方案将无法工作。非常奇怪。我现在也只是在尝试,并不断得到“没有找到适合jdbc的驱动程序:mysql://0.0.0.0:3306/__db_name__“错误。此连接到哪个云sql实例?”?如果我有多个云sql实例呢?