Bitbucket Pipelines now supports services! See (https://confluence.atlassian.com/bitbucket/test-with-databases-in-bitbucket-pipelines-856697462.html)
You can continue using all the features (except for the mysql part) whith my base image https://github.com/edbizarro/gitlab-ci-pipeline-php/