Host 'X' is not allowed to connect to this MySQL server

host biology
host thesaurus
host definition biology
host definition medical
how to pronounce host
host plural
host definition bible
host meaning in tamil

I wanna deploy MySQL+PHPMyAdmin. My docker-compose.yml:

version: "3"
services:
  db:
    image: mysql:5.7
    restart: always
    container_name: db
    volumes:
      - ./~mysql:/var/lib/mysql
      - ./mysql.cnf:/etc/mysql/conf.d/my.cnf
    environment:
      MYSQL_DATABASE: "dbtest"
      MYSQL_ROOT_PASSWORD: "123456"
      MYSQL_ROOT_HOST: "%"
    networks:
      - db
    command: --default-authentication-plugin=mysql_native_password
    healthcheck:
      test: "mysqladmin ping -h localhost"
      interval: 1s
      timeout: 1s
      retries: 60

  phpmyadmin:
    image: phpmyadmin/phpmyadmin:4.7
    restart: always
    container_name: phpmyadmin
    ports:
      - 8080:80
    networks:
      - external-net
      - db
    environment:
      PMA_HOST: db
    depends_on:
      - db

networks:
  external-net:
    external:
      name: external-net
  db:
    driver: bridge

After some time later I getting subject error. MYSQL_ROOT_HOST don't helped. When I trying to connect to mysql from db-container:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I really don't know what to do with this magic... Thx.

I've recreated your setup and was just adding some ENV configuration to do the trick, I've removed volumes section because there was no problem with it:

docker-compose.yml

version: "3"
services:
  db:
    image: mysql:5.7
    restart: always
    container_name: db
    environment:
      - MYSQL_ROOT_PASSWORD=rootpasswd
      - MYSQL_DATABASE=phpmyadmin
      - MYSQL_USER=user
      - MYSQL_PASSWORD=userpasswd
    networks:
      - db
    command: --default-authentication-plugin=mysql_native_password
    healthcheck:
      test: "mysqladmin ping -h localhost"
      interval: 1s
      timeout: 1s
      retries: 60

  phpmyadmin:
    image: phpmyadmin/phpmyadmin:4.7
    restart: always
    container_name: phpmyadmin
    ports:
      - 8080:80
    networks:
      - external-net
      - db
    environment:
      PMA_HOST: db
    depends_on:
      - db

networks:
  external-net:
    external:
      name: external-net
  db:
    driver: bridge

Accessing PHPMyadmin with root:rootpasswd works fine.

Host, an animal or plant on or in which a parasite or commensal organism lives. Medical Definition of host 1 : a living animal or plant on or in which a parasite lives — see definitive host , intermediate host 2 : the larger, stronger, or dominant one of a commensal or symbiotic pair

Sup? Looking? Party? A Guide to Gay App Lingo, a person or animal that has received transplanted tissue or a transplanted organ. n., v. host•ed, host•ing. n. 1. a person who receives or entertains guests at home or elsewhere. 2. an emcee, moderator, or interviewer for a television or radio program. 3. a company, place, or the like that provides services or resources, as for a convention or sporting event.

In Genetal settings of Docker enable daemon without TLS. I think It works.

Docker image

Host dictionary definition, a computer that mediates multiple access to databases mounted on it or provides other services to a computer network. noun. a person who receives or entertains guests at home or elsewhere: the host at a theater party. a master of ceremonies, moderator, or interviewer for a television or radio program. a person, place, company, or the like, that provides services, resources, etc., as for a convention or sporting event: Our city would like to serve as host for the next Winter Olympics.

Host, act as host at (an event) or for (a television or radio program). host definition: 1. someone who has guests: 2. a person who introduces guests and performers, especially on…. Learn more.

Host, store (a website or other data) on a server or other computer so that it can be accessed over the Internet. 1 a great number of persons or creatures massed together. a host of people assembled along the parade route to see the new president. Synonyms for host. army, bike. [ chiefly Scottish ], cram, crowd, crush,

HOST, Host definition, a person who receives or entertains guests at home or elsewhere​: the host at a theater party. See more. The Host ( 2020) The Host. A opportunity arises for Robert Atkinson, a London banker who risks his bank's money to leave the mundane behind to start a new life.

Comments
  • It is maybe the same thing as here: stackoverflow.com/questions/44590775/…