question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DB role doesn't exist

See original GitHub issue

Hey, before this tutorial, I was using the default PostgreSQL superuser simply named postgres and when I changed it to something I get this error: django.db.utils.OperationalError: FATAL: role "hello_django" does not exist I guess you need to create this user first but I haven’t seen that mentioned in the article anywhere.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mjhea0commented, Nov 6, 2019

Change the environment variables for the db service:

    environment:
      - POSTGRES_USER=hello_django
      - POSTGRES_PASSWORD=hello_django
      - POSTGRES_DB=hello_django_dev

Review the env var section of https://hub.docker.com/_/postgres for more info.

0reactions
DrewBregmancommented, Aug 25, 2021

Hey I’m still getting the same issue trying each step

Read more comments on GitHub >

github_iconTop Results From Across the Web

psql: FATAL: role "postgres" does not exist - Stack Overflow
To fix it, simply create a new user named postgres with the option --superuser using the createuser utility that comes with Postgres. The...
Read more >
FATAL: role "postgres" does not exist - enrq.me
According to the message, there's no user named postgres in the DB. So, let's try to create it with the createuser command installed ......
Read more >
psql: FATAL: role "postgres" does not exist
The error message is clear enough: role "postgres" does not exist : there is no database role named "postgres". Is it the only...
Read more >
PostgreSQL error: Fatal: role “username” does not exist
1 Answer ; sudo su - postgres. psql template1. create a role in pgsql with privilege as "superuser": ; CREATE ROLE username superuser;....
Read more >
How to Fix the Postgres Error: Role Does Not Exist for Rails ...
In this guide I'll walk through how to fix the error that can occur on Linux for Rails applications that use Postgres that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found