gpt4 book ai didi

google-app-engine - 为什么我不断收到 "No suitable driver found"错误?

转载 作者:行者123 更新时间:2023-12-02 21:40:27 25 4
gpt4 key购买 nike

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

"No suitable driver found for 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://”连接字符串时没有任何问题。

我该如何解决这个问题?

最佳答案

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

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

关于google-app-engine - 为什么我不断收到 "No suitable driver found"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20532948/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com