mysql - 尝试在 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 驱动程序,但没有帮助。
解决方案
我遇到了同样的问题。将 logLevel 设置为调试,您可以看到 Liquibase 正在创建和删除一个临时表。那个临时表似乎导致了这个问题。
我能够通过使用 MySQL Workbench 将架构复制到常规 MySQL 实例然后从那里运行 generateChangeLog 来解决这个问题。
推荐阅读
- python - 在Python中将同名的键添加到嵌套字典中
- keystonejs - 在 keystonejs 上从 nodemodule 添加库
- javascript - 刷新后页面加载回索引页面
- java - Java 文件从另一个分区中的路径创建
- python - 在 matplotlib 中使用 3 个变量绘制条件
- mysql - 如何将mysql数据库流量镜像到另一台服务器
- angular - 角度 6 中的角度数据表、嵌套行对齐问题和 dtOptions 未加载
- c# - C# WinForms 帮助实现 BackgroundWorker 和加载表单
- excel - 覆盖单元格excel VBA的重新格式化
- python - 如何表示用于神经网络的音频文件?