Unable to connect to the database.
error: password authentication failed for user "xxx"
Or
Password does not match for user “xxx”
--This occurs when you change the authentication information (POSTGRES_USER
or POSTGRES_PASSWORD
) after launching Docker once.
--Credentials are set at initial startup. After that, even if you try to start by changing the authentication information, an error will occur because it does not match the initially set value.
--Delete db volume and start it (* Note that the data in db volume will be lost).
##Remove docker
$ docker rm <xxx>
$ docker volume ls
DRIVER VOLUME NAME
local some_db_data
$ docker volume rm <volume>
or
$ docker volume prune
WARNING! This will remove all local volumes not used by at least one container.
Are you sure you want to continue? [y/N] y
##Confirm that it has been deleted
$ docker volume ls
https://stackoverflow.com/questions/54764965/password-does-not-match-for-user-postgres
Recommended Posts