I have configured /etc/mysql/my.cnf manually to use utf8. See below:
[mysqld]
character-set-serve
For your web-app please try characterEncoding=utf8 instead of UTF-8. That resolved my SonarQube container issue.
You may have to do with the following:
Changes in MySQL Connector/J 5.1.13 (2010-06-24)
Connector/J did not support utf8mb4 for servers 5.5.2 and newer.
Connector/J now auto-detects servers configured with character_set_server=utf8mb4 or treats the Java encoding utf-8 passed using characterEncoding=... as utf8mb4 in the SET NAMES= calls it makes when establishing the connection. (Bug #54175)