Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I cannot connect from adminer to postgresql

I try to up postgresql and adminer via docker container. But from adminer I cannot enter to postgresql with password and user I whote.

SQLSTATE[08006] [7] FATAL: password authentication failed for user "root"

I tried all.

version: '3'

services:
  web:
    build: .
    environment:
      - APACHE_RUN_USER=www-data
    volumes:
      - ./blog:/var/www/html/
    ports:
      - 8080:80
    working_dir: /var/www/html/
  db:
    image: postgres
    restart: always
    environment:
      POSTGRES_PASSWORD: kisphp
      POSTGRES_USER: root
      POSTGRES_DB: kisphp
    ports:
      - "5432:5432"
    volumes:
      - ./postgres:/var/lib/postgresql/data
  adminer:
    image: adminer
    restart: always
    ports:
      - "6080:8080"

like image 525
Виктор Васильев Avatar asked Aug 11 '26 18:08

Виктор Васильев


1 Answers

This docker-compose configuration works well.

Try recreating it from scratch:

  1. Delete ./postgres folder
  2. docker-compose stop
  3. docker-compose down
  4. docker-compose up -d
like image 127
Alex Pliutau Avatar answered Aug 14 '26 10:08

Alex Pliutau



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!