Docker-compose volume

This is where you declare a bind-mount, which results that everything inside the containre folder /var/lib/mysql will be stored in the subfolder db, relative to the the folder where you docker-compose.yml is located.

See: Compose file version 2 reference | Docker Docs for the documentation in the docker compose reference v2; If you are interessted in further details check Bind mounts | Docker Docs - even though it does not focus on the docker-compose.yml syntax, they are the very same concepts.