【问题标题】:Does liquibase support jdbc mysql connection urls in local.properties file?liquibase 是否支持 local.properties 文件中的 jdbc mysql 连接 url?
【发布时间】:2016-03-12 05:03:51
【问题描述】:

在 liquibase.local.properties 文件中使用 url="jdbc:mysql://127.0.0.1/mydbname" 运行 liquibase 命令(状态、更新)时,我收到以下错误。

Liquibase status Failed: 
liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: 
Connection could not be created to "jdbc:mysql://127.0.0.1/mydbname" with driver com.mysql.jdbc.Driver.  
Possibly the wrong driver for the given database URL

如果我运行相同的命令,但在命令行中传递 url,它就可以工作。

【问题讨论】:

  • 真的没有更多的例外吗?
  • 那是完全的例外。我添加了换行符。 :)
  • 属性文件中的 URL 周围真的有双引号吗?如果是,请尝试删除它们

标签: mysql jdbc liquibase


【解决方案1】:

该错误可能是因为 mysql 驱动程序不在您的类路径中。 Liquibase 正在识别 URL 并尝试将 com.mysql.jdbc.Driver 配置为要使用的驱动程序,但似乎无法找到它。

【讨论】:

    猜你喜欢
    • 2019-03-13
    • 2017-05-28
    • 2014-03-17
    • 2010-12-16
    • 1970-01-01
    • 2022-06-17
    • 2019-11-30
    • 2011-03-10
    • 2021-04-25
    相关资源
    最近更新 更多