I\'m trying to figure out how to implement docker using docker-compose.yml with 2 databases imported from sql dumps.
httpd: container_name: webserver
You're trying to bind both database containers to the same port - 3306. Which is essentially impossible. You need to change the port-mapping for one of the databases, for example mysql keeps 3306:3306, and mysql2 should use 3307:3306.
3306
mysql
3306:3306
mysql2
3307:3306