首页 > 解决方案 > 尝试在 Percona 上使用 liquibase 会出错

问题描述

我正在尝试为 percona 服务器上的数据库生成ChangeLog,当我尝试这样做时出现以下错误。

Starting Liquibase at Wed, 05 Dec 2018 22:34:37 EST (version 3.6.2 built at 
2018-07-03 11:28:09)
Unexpected error running Liquibase: liquibase.exception.DatabaseException: 
liquibase.exception.UnexpectedLiquibaseException: Error during testing for 
MySQL/MariaDB JDBC driver bug: could not retrieve JDBC metadata information 
for temporary table 'TMP_XDBOCVCKWHSQYXKP'
liquibase.exception.LiquibaseException: 
liquibase.command.CommandExecutionException: 
liquibase.exception.DatabaseException: 
liquibase.exception.UnexpectedLiquibaseException: Error during testing for 
MySQL/MariaDB JDBC driver bug: could not retrieve JDBC metadata information 
for temporary table 'TMP_XDBOCVCKWHSQYXKP'
at liquibase.integration.commandline.Main.doMigration(Main.java:1043)
    at liquibase.integration.commandline.Main.run(Main.java:191)
    at liquibase.integration.commandline.Main.main(Main.java:129)
    Caused by: liquibase.command.CommandExecutionException: 
    liquibase.exception.DatabaseException: 
    liquibase.exception.UnexpectedLiquibaseException: Error during testing 
    for MySQL/MariaDB JDBC driver bug: could not retrieve JDBC metadata 
    information for temporary table 'TMP_XDBOCVCKWHSQYXKP'

我正在尝试使用以下语句通过命令行使用它

liquibase --driver=com.mysql.cj.jdbc.Driver --classpath=C:/liquibase-3.6.2- 
bin/jars/mysql-connector-java-8.0.13.jar --changeLogFile=db.changelog- 
1.0.xml --url="jdbc:mysql://REMOTE_SERVER_IP:3306/DB_NAME? 
autoReconnect=true" --username=USER_NAME --password=PASSWORD --logLevel=info 
generateChangeLog

有没有人遇到过这个问题?我尝试使用新旧 JDBC 驱动程序,但没有帮助。

标签: mysqlliquibasepercona

解决方案


我遇到了同样的问题。将 logLevel 设置为调试,您可以看到 Liquibase 正在创建和删除一个临时表。那个临时表似乎导致了这个问题。

我能够通过使用 MySQL Workbench 将架构复制到常规 MySQL 实例然后从那里运行 generateChangeLog 来解决这个问题。


推荐阅读