docker-compose with multiple databases

后端 未结 6 697
天涯浪人
天涯浪人 2020-12-25 10:51

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
            


        
6条回答
  •  时光取名叫无心
    2020-12-25 11:30

    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.

提交回复
热议问题