First login into postgres server
$ sudo -u postgres psql
Change the password
ALTER USER postgres WITH ENCRYPTED PASSWORD 'postgres';
Then go and change the conf
$sudo nano /etc/postgresql/9.5/main/pg_hba.conf
Change from peer to md5
Instead of this
local postgres postgres peer
Change to this
local postgres postgres md5
Then restart server
$ sudo service postgresql restart
Credits:
https://stackoverflow.com/a/69778580/379779
https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
Top comments (0)