Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Forgot the password I entered during postgres installation

What I did to resolve the same problem was:

Open pg_hba.conf file with gedit editor from the terminal:

sudo gedit /etc/postgresql/9.5/main/pg_hba.conf
It will ask for password. Enter your admin login password. This will open gedit with the file. Paste the following line:

host  all   all  127.0.0.1/32  trust
just below -

# Database administrative login by Unix domain socket
Save and close it. Close the terminal and open it again and run this command:

psql -U postgres
You will now enter the psql console. Now change the password by entering this:

ALTER USER [your prefered user name] with password '[desired password]';
If it says user does not exist then instead of ALTER use CREATE.

Lastly, remove that certain line you pasted in pg_hba and save it.

Comment

forgot postgres password

psql -U postgres
Comment

PREVIOUS NEXT
Code Example
Shell :: docker starting too long 
Shell :: docker node alpine 
Shell :: update git repository 
Shell :: How to find your ip on debian linux wsl 
Shell :: git diff show only files 
Shell :: default pem file permissions 
Shell :: how to install terraform in ubuntu 18.04 
Shell :: bash blackeye 
Shell :: dollar to pkr 
Shell :: open calculator from command line MacOS 
Shell :: terminator for kali linux 
Shell :: debian install openjdk 
Shell :: copy all files from a folder to another ubuntu 
Shell :: ffmpeg gif images 
Shell :: how to install the app of specific version in laravel 
Shell :: npm github pages 
Shell :: bash "set -e" 
Shell :: install rollup locally 
Shell :: remove unused images docker manually version 1.12.6 
Shell :: bash for each line of file 
Shell :: kubernetes get deployments 
Shell :: github delete last commit 
Shell :: windows edit file cmdf 
Shell :: how to enable remote desktop with cmd 
Shell :: remove cuda windows cmd 
Shell :: linux decode base64 string 
Shell :: git rename 
Shell :: ImportError: No module named alsaaudio 
Shell :: git remove all files in gitignore 
Shell :: install brew on raspberry pi 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =