简体   繁体   English

jdbi引发SQLException:未知系统变量'tx_read_only'

[英]jdbi throws SQLException: Unknown system variable 'tx_read_only'

This happens pretty with all queries but the stacktrace I'm looking at creates it at handle.update() with some simple query. 所有查询都会发生这种情况,但是我正在查看的堆栈跟踪通过一些简单查询在handle.update()中创建了它。

Everything works just fine on the laptop I'm developing with but fails miserably on the server. 一切在我开发的笔记本电脑上都可以正常工作,但是在服务器上却无法正常工作。

Laptop:
OS: Ubuntu 15.10
jdbi: 2.73
java: Oracle 1.8.0_91 
mysql: 14.14 Distrib 5.6.30, for debian-linux-gnu (x86_64) using  EditLine wrapper

Server:
OS: Linux Mint 17.1
jdbi: 2.73
java: Oracle 1.8.0_91-b14
mysql: 14.14 Distrib 5.5.49 for debian-linux-gnu (x86_64) using readline 6.3

As far as my understanding goes, the databases have been initalized the same way. 据我所知,数据库是以相同的方式初始化的。

JDBC connectors should also be identical as I'm using the very same Gradle file to build in both environments. JDBC连接器也应该相同,因为我在两个环境中都使用相同的Gradle文件进行构建。

Upgrading to 5.7 did the trick, as @joachim-isaksson suggested. 正如@ joachim-isaksson所建议的那样,升级到5.7可以达到目的。 Thought that 14.14 was the version and the distribution part just some somewhat meaningless string. 认为14.14是版本和发行版部分只是一些毫无意义的字符串。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MySQL:未知系统变量“tx_read_only” - MySQL: Unknown system variable 'tx_read_only' java.sql.SQLException: 未知的系统变量 'tx_isolation' - java.sql.SQLException: Unknown system variable 'tx_isolation' java.sql.SQLException:未知的系统变量'transaction_isolation' - java.sql.SQLException: Unknown system variable 'transaction_isolation' java.sql.SQLException:未知的系统变量“ OPTION” - java.sql.SQLException: Unknown system variable 'OPTION' 使用 spring R2DBC 连接 mySQL 服务器版本 8 时出现未知的系统变量“tx_isolation” - Unknown system variable 'tx_isolation' when using spring R2DBC to connect with a mySQL server version 8 java.sql.SQLException:尽管具有最新的 JDBC,但系统变量“query_cache_size”未知 - java.sql.SQLException: Unknown system variable 'query_cache_size' despite having latest JDBC java.sql.SQLException: 未知的系统变量 'query_cache_size' - java.sql.SQLException: Unknown system variable 'query_cache_size' @SqlQuery抛出org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException:java.sql.SQLException:SQL Anywhere错误-131 - @SqlQuery throws org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException: java.sql.SQLException: SQL Anywhere Error -131 odd SQLException - 无法检索转换只读状态服务器 - odd SQLException - Could not retrieve transation read-only status server SQLException: 无法检索事务只读状态服务器 - SQLException: Could not retrieve transation read-only status server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM