Yeah I have just done it actually. You can run the mysql service of pipelines as root.
In bitbucket-pipelines.yml you can define your mysql service like:
environment:
MYSQL_DATABASE: 'pipelines'
MYSQL_ROOT_PASSWORD: 'let_me_in'
For the Laravel side, update your .env.build to use root: e,g .env.build
DB_USERNAME=root
DB_PASSWORD=let_me_in
And/Or update your database config for use different credentials for tests or dedicated db connection:
config/database file:
'connections' => [
'testing_db' => [
'username' => env('DB_TESTS_USERNAME', 'root'),
'password' => env('DB_TESTS_PASSWORD', 'let_me_in'),
// ... plus any other setting that may be different like db names, etc..
]
]