I'm trying to set up Mautic in a Docker container with an Azure Database for MySQL backend. However, I'm encountering the following error:
Warning: mysqli::__construct(): (HY000/3159): Connections using insecure transport are prohibited while --require_secure_transport=ON. in /makedb.php on line 20 MySQL Connection Error: (3159) Connections using insecure transport are prohibited while --require_secure_transport=ON.
Here are the details of my setup:
version: "2"
services:
mautic:
container_name: mautic
image: mautic/mautic:v4-apache
volumes:
- mautic_data:/var/www/html
environment:
- MAUTIC_DB_HOST=mydbase.mysql.database.azure.com
- MAUTIC_DB_USER=mydbuser
- MAUTIC_DB_PASSWORD=mydbuserpwd
- MAUTIC_DB_NAME=mydbname
restart: always
networks:
- mauticnet
ports:
- "8880:80"
networks:
mauticnet:
volumes:
mautic_data:
My Azure Database for MySQL has SSL enabled by default, and I have successfully connected to it using a separate tool outside the Mautic container. However, when running the Mautic container, I encounter the aforementioned error related to secure transport.
I suspect there might be an issue with how the Mautic container handles SSL/TLS when connecting to the Azure Database for MySQL.
Could someone please guide me on how to resolve this error and establish a secure connection between Mautic and Azure Database for MySQL within the Docker container?
Any insights or suggestions would be greatly appreciated. Thank you in advance!
This was solved by setting require_secure_transport to false into Database Server Parameters into Azure DB for MySQL.