michalhosna / adminer-docker

ARCHIVED. Sorry, i do not use Adminer any more. See forks. Adminer docker image with extended env variables for autologin
https://github.com/michalhosna/adminer-docker/forks
Other
27 stars 12 forks source link

mysql port #7

Open palansher opened 2 years ago

palansher commented 2 years ago

Thank you for great job!

No possibility to set non-standard port for mysql/mariadb ?

michalhosna commented 2 years ago

You can set non-standart port for mysql/mariadb as for any other db type in the ADMINER_SERVER env var, e.g. ADMINER_SERVER: mysql:61894.

Please try that and let me known if it works for you :)

Full example:

port.cnf

[mysqld]
port=61894

docker-compose.yaml

version: '2.4'
services:
    adminer:
        image: michalhosna/adminer:4.8.1-en_v1
        ports:
            - 8080:8080
        environment:           
            ADMINER_SERVER: mysql-server:61894
            ADMINER_DB: mysql
            ADMINER_PASSWORD: adminer
            ADMINER_USERNAME: root
            ADMINER_AUTOLOGIN: 1
            ADMINER_NAME: This will be in the title!

    mysql-server:
        image: mysql:8-debian
        platform: linux/amd64
        command: --default-authentication-plugin=mysql_native_password
        volumes:
            - ./port.cnf:/etc/mysql/conf.d/port.cnf
        environment:
            MYSQL_ROOT_PASSWORD: adminer

Sorry for late reply

palansher commented 2 years ago

Great! Thank you!

it's such a covert variable (ADMINER_SERVER) that it's even impossible to google it as https://www.google.com/search?q=%22ADMINER_SERVER%22 :)

palansher commented 2 years ago

Strange, but I see no changes in adminer's web panel after I added ENV vars and rebuild container.

environment: ADMINER_SERVER: mysql-server:9999 ADMINER_DB: mysql

form fields remains the same image


But I found the solution to add non-standard port:

gt-mysql:5555  in the form

Thanks for tips and your product!