Hello everyone,
I tried Maria DB a while ago (1 year or so) and i had no problems with it. Today I tried it again but can’t manage to remote connect to database from any sql clients(terminal or DataGrip) from my host.
So more info:
Host:
- OS: macOS
- Docker version: Version 18.03.0-ce-mac60 (23751)
- Using docker-compose up -d command
What did I tried:
- changing cnf file to deactivate bind 0.0.0.0 line, to activate it and to change it to 127.0.0.1
- being sure that the user created in compose file exists and have remote access priv
What error i get:
when i use mysql --host=127.0.0.1 --port=8000 -u ****** -p
on host’s terminal I get ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (61)
But when I try to connect to db from container is working.
custom cnf file correctly loaded in container:
[client]
default-character-set = utf8
[mysqld]
bind-address = 127.0.0.1
character-set-server = utf8
collation-server = utf8_general_ci
character_set_server = utf8
collation_server = utf8_general_ci
yaml file:
version: '3'
services:
mq:
image: "rabbitmq:3-management"
restart: always
environment:
RABBITMQ_DEFAULT_USER: "******"
RABBITMQ_DEFAULT_PASS: "******"
RABBITMQ_DEFAULT_VHOST: "/"
ports:
- "8080:15672"
- "5672:5672"
- "5671:5671"
labels:
NAME: 'rabbitmq1'
volumes:
- ./MountPoints/Data/RabbitMQ:/var/lib/rabbitmq/mnesia/
DB:
image: "mariadb:10.3"
restart: always
ports:
- "3306:8000"
environment:
MYSQL_ROOT_PASSWORD: "******"
MYSQL_USER: "******"
MYSQL_PASSWORD: "******"
MYSQL_DATABASE: "******"
volumes:
- ./MountPoints/Data/projDB:/var/lib/mysql
- ./MountPoints/Configs/SQL:/etc/mysql/conf.d/
Thank you for any ideas