In case you encounter this error with mysql and your docker-compose setup:
Unknown MySQL server host <mysql-service-name>
Code language:HTML, XML(xml)
… and you dont know why because everything seems to be correct.
Then you might have an upgrade problem with mysql because you are reusing an old volume that was created for another mysql version. This can happen when you use a unspecified tag as mysql:latest (not recommended anyway) and there was a version bump in the official mysql image. Or you upgraded the mysql container yourself, f.e. from mysql:5.6 to mysql:5.7 and you are reusing the data volume with the mysql files.
Recently i wanted to use Sqlite with Adminer in Docker and it turned out to be not so easy. I actually thought i could just declare Adminer in a docker-compose.yml file with a volume mounted, similar as i would do for adminer with mysql.
But since Adminer is a popular hacking target they introduced a feature that does not allow to run adminer without a password, out of the box. Sqlite database usually runs without password and dang, workaround needed!