I have Django app with PostgreSQL.
The app has those environment variables:
DATABASE_HOST=localhost
DATABASE_USER=admin
DATABASE_PASSWORD=admin
Here is psql output:
postgres=# CREATE USER admin WITH PASSWORD 'admin123';
ERROR: role "admin" already exists
postgres=# select * from USER;
current_user
--------------
postgres
(1 row)
postgres=# GRANT ALL privileges ON DATABASE my_db to admin;
GRANT
When I try to take something from db I get
ProgrammingError: permission denied for relation app_rangeslot
.
So, the questions:
1) If user admin have all rights, why I get permission denied error?
2) If user admin is created, why I cannot see it?