See this for mysql, it shows the bug this gist demonstrates. https://bugs.mysql.com/bug.php?id=83295
Download my.cnf and test.sql to an empty directory
docker run -d -v $(pwd):/etc/mysql/conf.d -e MYSQL_ALLOW_EMPTY_PASSWORD=yes --name mysql mysql:5.7.17