Reproduced both with Mac, Windows and Linux. Both with MariaDB 10.2 and 10.3 images.
It passes ok running with moodle-ci-runner and also with real DB (not-dockered) instance. Also MySQL passes ok.
- Setup moodle-docker to use mariadb
- Init phpunit
- Run phpunit (-c h5p is enough, if you use --buildcomponentconfigs
After a point in the execution, it fails all the tests with "MySQL is gone" error.
Narrowing the problem, I was able to reproduce it just executing -c h5p tests. I always fails @ core_h5p\helper_testcase (test_display_options or any other h5p unit test).