we should switch to the mariadb java connector once we upgrade to gerrit 2.14. Reason is we will not be able to use the debian repo to manage mysql connector for us when we upgrade to 2.15 as it bumps the version to 6.x and includes breaking api changes which is done in gerrit.
Secondly we should use this connector as we use mariadb, so lets use a connector made for mariadb. The connector also works for mysql.
I've been using this connector locally and on gerrit-test3.
we can use it like
type = mariadb
hostname = <ip>
database = <db>
username = <username>
url = jdbc:mariadb://<ip>/<db>?sessionVariables=character_set_client=utf8,character_set_results=utf8,character_set_connection=utf8,collation_connection=utf8_unicode_ci,collation_database=utf8_unicode_ci,collation_server=utf8_unicode_ci
we won't need to manage these connectors long as gerrit 3.0 will drop support for db.