Comment 7 for bug 1575688

Confirmed @namgon's fix (this is building Openstack Liberty on 16.04; I was seeing the problem populating the keystone database):

1) Replace all instances of 'utf8mb4' with 'utf8' in /etc/mysql/mariadb.conf.d/*

2) Add the below to /etc/mysql/conf.d/mysqld_openstack.cnf:
default-character-set = utf8

bind-address =
default-storage-engine = innodb
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8

default-character-set = utf8

3) Drop the keystone database
4) Restart mysql service
5) Run 'keystone-manage db_sync'

For some reason I was still getting the error when /etc/mysql/conf.d/mysqld_openstack.cnf had the above values, and modifying the files in /etc/mysql/mariadb.conf.d/ was also necessary to fix.