Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

267
Views
is not allowed to connect to this MariaDB server docker compose

I want to create connection in my nodejs to mariadb. my nodejs and mariadb build in docker compose, for nodejs can access public with dns but for mariadb can not, it is can access via server with ip. I always get error Host '172.19.0.2' is not allowed to connect to this MariaDB server docker

can anyone help me how to connect to mariadb. Or what is possible docker container connect to localhost mariadb in server?

Note: edited

this is my docker-compose.yml

version: '3'

volumes:
  mariadb:
    driver: local

networks:
    db:
        driver: bridge

services:
  mariadb:
    image: mariadb:10.6
    restart: always
    environment:
      MYSQL_ROOT_HOST: '%'
      MYSQL_ROOT_PASSWORD: password
      MYSQL_USER: admin1
      MYSQL_PASSWORD: admin1
    expose:
        - "40000"
    ports:
        - "40000:3306"
    volumes:
     - mariadb:/var/lib/mysql
    networks:
      db:
              
  phpmyadmin:
    image: phpmyadmin
    restart: always
    expose:
      - "40001"
    ports:
      - "40001:80"
    environment:
      - PMA_HOST=mariadb
      - PMA_PORT=3306 
    networks:
      db:
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!