I'd like to use Google Cloud SQL for my app, but I require that utf8mb4 be set as the server character set in order to correctly process 4 byte utf8 characters (emoji).
It is not enough to simply set the table or database character set because the driver connection (mysql-connector-java) is negotiated based on the server character set.
Is it possible to set the server character set with Cloud SQL?
If not, is there another workaround that could allow me to force the driver connection to utf8mb4?
Here is a copy of my connection string: jdbc:mysql://<host>/<db_name>?useUnicode=true&characterEncoding=utf-8
Note that setting the characterEncoding variable in the driver connection string to utf-8mb4 or utf8mb4 is illegal. My best information say that it has to be set to utf-8 and then it will upgrade to utf8mb4 if the server is using that character set.