Bitbucket fails to start with Unknown system variable 'query_cache_size' when connecting to MySQL v8+

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

Whey trying to connect to a  MySQL 8.0.11+ database, the connection fails.

When starting Bitbucket having upgraded MySQL to v8.0.11+, Bitbucket fails to start. 

環境

MySQL v8.0.11+
Connector v 5.1.42 or earlier

診断

The following appears in the logs

ERROR [spring-startup] com.zaxxer.hikari.pool.HikariPool bitbucket - Exception during pool initialization.
java.sql.SQLException: Unknown system variable 'query_cache_size'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
...


原因

The  query cache has been removed from the server since MySQL v8.0.3. The connector that supports this has to be version 5.1.43+ (see Connector 5.1.43 release notes)

ソリューション

  1. Download the latest 5.1.x connector from https://downloads.mysql.com/archives/c-j/
  2. Copy the mysql-connector-java-5.1.XX-bin.jar file from the extracted directory to your <Bitbucket home directory>/lib directory (for Bitbucket Server 2.1 or later).
  3. Stop, and then restart Bitbucket Server. See Start and stop Bitbucket.


最終更新日 2021 年 4 月 30 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.