【问题标题】:updating MySQL 5.6.40 DD with liquibase in AWS在 AWS 中使用 liquibase 更新 MySQL 5.6.40 DD
【发布时间】:2019-06-27 13:39:14
【问题描述】:

我刚刚在 AWS 中创建了一个 DB MySQL 5.6.40。我可以使用 Sequel Pro 1.1.2 连接到数据库

这是我在 pom.xml 文件中的配置:

<plugin>
  <groupId>org.liquibase</groupId>
  <artifactId>liquibase-maven-plugin</artifactId>
  <version>3.5.3</version>
  <configuration>
    <changeLogFile>src/main/resources/datamodel/liquibaseChangeLog.xml</changeLogFile>
    <driver>com.mysql.jdbc.Driver</driver>
    <url>pradera.cwob2oxhu1so.eu-central-1.rds.amazonaws.com</url>
    <username>pradera</username>
    <password>AzSWMdlckdstgs0aed</password>
  </configuration>
  <executions>
    <execution>
      <phase>process-resources</phase>
      <goals>
        <goal>updateSQL</goal>
      </goals>
    </execution>
  </executions>
  <dependencies>
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.27</version>
    </dependency>
  </dependencies>
</plugin>

但是当我运行mvn clean package -DskipTests

我收到了这个错误:

错误] 无法在项目 icrypts 上执行目标 org.liquibase:liquibase-maven-plugin:3.5.3:updateSQL(默认):设置或运行 Liquibase 时出错:liquibase.exception.DatabaseException:liquibase.exception.DatabaseException:无法使用驱动程序 com.mysql.jdbc.Driver 创建与 pradera.cwob2oxhu1so.eu-central-1.rds.amazonaws.com 的连接。给定数据库 URL 的驱动程序可能错误 -> [帮助 1] [错误]

【问题讨论】:

  • 我希望这不是您在此处发布的真实用户和密码...
  • 不,谢谢 :-) 它不是
  • 你能用DB工具和JDBC驱动连接数据库吗? Liquibase 使用 JDBC。因此,尝试使用其他使用 JDBC 的东西连接到数据库可能会有所帮助,以确保连接正常工作。
  • 该 url 看起来不像 JDBC url。不应该像jdbc:mysql://pradera.cwob2oxhu1so.eu-central-1.rds.amazonaws.com

标签: mysql amazon-web-services spring-boot amazon-rds liquibase


【解决方案1】:

pradera.cwob2oxhu1so.eu-central-1.rds.amazonaws.com 更改为jdbc:mysql://pradera.cwob2oxhu1so.eu-central-1.rds.amazonaws.com

【讨论】:

    猜你喜欢
    • 2017-04-10
    • 1970-01-01
    • 2013-01-08
    • 2017-09-29
    • 2013-05-13
    • 1970-01-01
    • 2018-06-22
    • 2013-10-07
    • 1970-01-01
    相关资源
    最近更新 更多