I use MySQL database in Bitbucket build pipeline defined like this:
definitions:
services:
mysql:
image: mysql:5.7
variables:
MYSQL_DATABASE: testbase
MYSQL_ROOT_PASSWORD: pass
But it use wrong (default) charset and collation. I need UTF-8 to get rid of exceptions like:
SQLException: Incorrect string value: '\xC5\x88' for column 'city' at row 1
Is there a way to fix it in bitbucket-pipelines.yml? In a standard Docker setup I can fix it this way:
database:
image: mysql:5.7
environment:
MYSQL_DATABASE: testbase
MYSQL_ROOT_PASSWORD: pass
command: [ 'mysqld', '--character-set-server=utf8', '--collation-server=utf8_general_ci' ]