Ecommerce Shopify WordPress Discussion

Second MySQL Docker container not using different port

Hello I'm trying to run two different MySQL versions as docker containers, however when I want to connect a second Wordpress blog, I'm greeted with the error message: Error establishing a database connection. In the container logs everything is looking fine and I did change the network section and ports in my docker-compose.yml, but from looking at the container information I see that the MySQL container is still using 3306/tcp as port, even though I changed it with the environment variable MYSQL_TCP_PORT: 3307 and it is using this one as well. Running two independent setups is mandatory. Thank you for your replies! docker ps 3306/tcp, 33060/tcp, 0.0.0.0:3307->3307/tcp, :::3307->3307/tcp docker-compose.yml Credentials are sanitized version: "3" networks: test: name: test ipam: driver: default config: - subnet: 192.168.99.0/24 ip_range: 192.168.99.0/26 gateway: 192.168.99.1 attachable: true services: db2: image: mysql:8.0.36 command: --default-authentication-plugin=mysql_native_password container_name: MySQL2 environment: MYSQL_ROOT_PASSWORD: 1234 MYSQL_ONETIME_PASSWORD: True MYSQL_USER: test MYSQL_PASSWORD_FILE: 1234 MYSQL_DATABASE: db2 MYSQL_TCP_PORT: 3307 volumes: - /Wordpress/MySQLTest/:/var/lib/mysql ports: - 3307:3307 networks: - test wordpress: depends_on: - db2 image: wordpress:6.4.0-php8.0-apache container_name: Wordpress2 ports: - "18888:80" environment: WORDPRESS_DB_HOST: db_dev:3307 WORDPRESS_DB_USER: test WORDPRESS_DB_PASSWORD: 1234 WORDPRESS_DB_NAME: db2 volumes: - /WordpressTest:/var/www/html networks: - test I did some trial & error testing using the appropriate environment variable or without it and change the port mapping.
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.