How to reset my password in database?

Hello,
I am running OpenReplay in a VM with no integration with an email provider. How do i reset my credentials via CLI ?

Follow the below steps to reset the password directly in the database:

  1. Run k9s -n db
  2. Look for a pod called postgresql** and press s
  3. PGPASSWORD=$POSTGRES_PASSWORD psql -U $POSTGRES_USER -d $POSTGRES_DB
  4. Replace email&password in the first line of this query, and run it:
WITH a AS (SELECT 'EMAIL@.COM' AS email, 'NEW PASSWORD' AS password)
UPDATE public.basic_authentication
SET password=crypt((SELECT password FROM a), gen_salt('bf', 12))
WHERE user_id = (SELECT user_id
                 FROM public.users
                 WHERE email = (SELECT email FROM a)
                 LIMIT 1)
RETURNING TRUE AS done;
  1. \q
  2. exit
  3. :quit