【问题标题】:Why do I keep getting a "No suitable driver found" error?为什么我不断收到“未找到合适的驱动程序”错误?
【发布时间】:2013-12-12 00:47:21
【问题描述】:

当我尝试从 GAE 连接到 Cloud SQL 时出现此错误:

“找不到合适的驱动程序 jdbc:google:mysql://parasql-app:inst101/db1384221549822"

我的代码如下所示:

Class.forName("com.mysql.jdbc.GoogleDriver");
Connection con = DriverManager.getConnection("jdbc:google:mysql://" + this.instance_name + "/" + this.database_name);

我在连接旧式“jdbc:google:rdbms://”连接字符串时没有问题。

我该如何解决这个问题?

【问题讨论】:

    标签: google-app-engine jdbc google-cloud-sql


    【解决方案1】:

    您需要启用 mysql connector/j。请按照以下链接中的说明进行操作。

    https://developers.google.com/appengine/docs/java/cloud-sql/#enable_connector_j

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-11-21
      • 1970-01-01
      • 2018-08-27
      • 1970-01-01
      • 1970-01-01
      • 2016-11-04
      • 1970-01-01
      相关资源
      最近更新 更多