As @HansKillan said, I changed the password when the database already existed, the changed password was ignored, it was using the old password. I had to manually change my user's password by writing sql command using docker exec <container_name>... using SQL command to change user password. Then everything worked out. In your case, if your database doesn't contain much data, then you can just delete the volume and recreate the container to shorten the time