FATAL: role "postgres" does not exist on Docker container

Viewed 374

I'm starting a simple postgresql container like this:

docker run --name postgresql -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres:11.7-alpine

As I'm not specifying the username will be using the default one "postgresq", but when I try to create a datasource using intelliJ or a connection into a spring boot project, I'm always getting the same error:

FATAL: role "postgres" does not exist

Thanks for your help.

1 Answers

Well, was a silly mistake, didn't notice that the PC (I got it from work) already has a running PostgreSQL server.

Related