DEV Community

Zaw Htut Win
Zaw Htut Win

Posted on

How to update postgres (default user) password and rails+ruby compatibility table

First login into postgres server

$ sudo -u postgres psql
Enter fullscreen mode Exit fullscreen mode

Change the password

ALTER USER postgres WITH ENCRYPTED PASSWORD 'postgres';
Enter fullscreen mode Exit fullscreen mode

Then go and change the conf

$sudo nano /etc/postgresql/9.5/main/pg_hba.conf
Enter fullscreen mode Exit fullscreen mode

Change from peer to md5
Instead of this

local   postgres   postgres   peer
Enter fullscreen mode Exit fullscreen mode

Change to this

local   postgres   postgres   md5
Enter fullscreen mode Exit fullscreen mode

Then restart server

$ sudo service postgresql restart
Enter fullscreen mode Exit fullscreen mode

Credits:
https://stackoverflow.com/a/69778580/379779

https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html

Top comments (0)