I was trying to use adminer as my gui to manage my database. For that, in my docker-compose file I defined a Username, a Password and the Database. But everytime I tried to access the database with the correct data. I got the following error:
And my docker-compose code is the following:
version: "3.8"
services:
mariadb:
image: mariadb:latest
container_name: mariadb
restart: always
environment:
MYSQL_USER: adminer
MYSQL_PASSWORD: adminer
MYSQL_DATABASE: noinch
ports:
- 5555:3306
volumes:
- db_data:/var/lib/mysql
adminer:
image: adminer:latest
container_name: adminer
restart: always
ports:
- 7777:8080
volumes:
db_data:
Have a nice day!
You must tell the Adminer the environment variables.
environment:
ADMINER_DEFAULT_SERVER: mariadb
version: "3.8"
services:
mariadb:
image: mariadb:latest
container_name: mariadb
restart: always
environment:
MYSQL_USER: adminer
MYSQL_PASSWORD: adminer
MYSQL_DATABASE: noinch
ports:
- 5555:3306
volumes:
- db_data:/var/lib/mysql
adminer:
image: adminer:latest
container_name: adminer
environment:
ADMINER_DEFAULT_SERVER: mariadb
restart: always
ports:
- 7777:8080
volumes:
db_data:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With