Java connection MySQL for incremental pruning operation times wrong

Source: Internet
Author: User

After the Java connection to the MySQL database executes the EXECUTE statement, the console always complains, as follows:

  Exception in thread "main"java.sql.SQLException: Could not retrieve transation read-only status server

  ……?

  Caused by: java.sql.SQLException: Unknown system variable ‘tx_read_only‘

我捣鼓了一整个下午,参考别人的代码,甚至完全套用别人的工程来跑一遍结果还是报这个错误。

排除语法错误后我以为是connector有问题,但重新下了一个仍无济于事,

最后我索性把MySQL卸掉,到官网重下了个最新版,以及最新版connector,结果大功告成。

所以结论是:connector和MySQLserver的版本不匹配或者其中某一个有问题?

Java connection MySQL for incremental pruning operation times wrong

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.