Issue Summary

I have installed redash with GCE image before docker setup came out. The postgres database was set up with the installation, probably with a random password. I checked the .env config file (see below). It just says postgresql:///redash. I need the postgres password to set up a DB connection. Is there a way to find the password? or If I reset the password, how can I let Redash know the password has been changed?

image

Technical details:

  • Redash Version: 7.0.0+b17535 (15c815fb)
  • Browser/OS: Ubuntu 18.04 Chrome Browser
  • How did you install Redash: Installed with Redash GCE image a while ago before docker setup came out,

Default password for postgres is ‘postgres’ . You can login just like ’ psql -U postgres ’ . Have a try !

I don’t think that postgres has a password, if you configured things with the old script - you’re connecting on the local machine, so the connection will be through a unix socket and the daemon will just check the owner of the process connecting to it. I believe PostgreSQL call this “peer authentication”.

I believe the old script simply did:

sudo -u postgres createuser redash --no-superuser --no-createdb --no-createrole
sudo -u postgres createdb redash --owner=redash 

If you want to access the postgres DB from another host (or from within Redash itself) then you’d need to set a password & make possibly make PG listen on something other than the localhost address.

Guessing here, but when looking at the env config file for my (Docker based) installation, it has:

REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://redis:6379/0
POSTGRES_PASSWORD=mypasswordhere
...

Seeing as the REDASH_* items match yours, then it’s probably a reasonable guess that if you add POSTGRES_PASSWORD=stuff to yours, that should work. After you reset the PostgreSQL password of course.

But definitely back things up first, just in case (eg pg_dumpall). :slight_smile:

In these images Postgres was using system authentication, so you can access it with sudo -u postgres psql.

1 Like