MySql Port Forwarding

To be completed by the original poster:

CMS Version

2.3.7

Installation Method

Docker

Operating System

Ubuntu Desktop 20.04 LTS

Issue

Hello, I have a question if it is possible and if so, how to connect to mysql from an external host

I mean port redirection to the container, I don’t know how and if it’s possible in xibo

the most convenient thing to do would be to run the mysql container immediately with the port forwarded out

Thank you very much for any hints

You would just add a ports line to the docker-compose configuration, but keep in mind then you’re exposing MySQL to the network, which isn’t intended and isn’t very secure. You should at the very least ensure you run a firewall too to restrict access to just authorised hosts.

You can make that configuration persist by creating a docker-compose.override.yml file and adding your override there - for example:

version: "2.1"
services:
    cms-db:
        ports:
            - "3306:3306"

If you want it only exposed to the host machine, which would be slightly more secure, then do this:

version: "2.1"
services:
    cms-db:
        ports:
            - "127.0.0.1:3306:3306"

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.