0

I recently downloaded PostgreSQL, and because this SQL server needed to be connected to RShiny for my project (I'm following this tutorial) , I need md5 authentication instead of scram-sha-256 to avoid SCRAM authentication requires libpq version 10 issue as advised here

Following the second link above, I changed "scram-sha-256" to "md5" for both pg_hba.conf and postgresql.conf files. However, I could not update my postgresql password in SQL Shell (psql). I entered

ALTER USER postgres WITH PASSWORD 'new-password'

enter image description here

no return message so I assumed I did it successfully, but when I close psql shell window and come back, only my old password works, the new one does not. Similarly if I try to connect to server via pgAdmin4.

I do see people mentioned a step about go to Service window and restart postgresql-x64-13, but when I go there, I can only "start" not "restart", and if I start it, a message window will pop up: "the postgresql-x64-13 service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs".

Any advice please? Thank you!

(PS, the ultimate goal is to avoid the libpq version 10 error for rshiny connection, so if someone can directly help with this using other methods, I would appreciate it too)

Helene
  • 953
  • 3
  • 12
  • 22
  • 2
    You don't show a semicolon at the end of the statement. And `psql` prints a status tag after running a command when it runs successfully. So most likely, you never actually ran the ALTER statement because without the semicolon, it never got submitted to the server (although you still should have seen something: an input continuation prompt) – jjanes Jul 19 '21 at 02:08
  • 1
    can you share the output that you got after executing alter statement? – ROHIT KHURANA Jul 19 '21 at 02:10
  • Thank you @jjanes and Rohit. There was absolutely no return message. I will posted it to the question shortly. Any idea why it is not submitted to the server? – Helene Jul 19 '21 at 02:18
  • 1
    semicolon is missing after statement. – ROHIT KHURANA Jul 19 '21 at 02:26
  • 1
    Try to execute the below statement and post the result `ALTER USER postgres WITH PASSWORD 'new-password';` – Rj_N Jul 19 '21 at 03:47
  • Thank you very much. New to postgresql didn't know this is required! – Helene Jul 19 '21 at 04:29

0 Answers0