most recent 30 from stackoverflow.com2026-05-01T14:45:07Zhttps://stackoverflow.com/feeds/question/30703347https://creativecommons.org/licenses/by-sa/4.0/rdfhttps://stackoverflow.com/q/307033471Saphal Adhikarihttps://stackoverflow.com/users/49828302015-06-08T07:27:05Z2016-05-03T14:12:42Z
<p>recently i have installed postgresql 9.4 on my windows 8 machine
while installing PostgreSQL though GUI interface it prompt me for password
i entered password and then installed process completed afterward.
when i go cmd prompt (through administrative right)and type "psql" it prompts me for password ,when i enter the same password i used while installing PostgreSQL i get following error.</p>
<pre><code>C:\Users\saphal>psql
Password:
psql: FATAL: password authentication failed for user "saphal"
</code></pre>
<p>please suggest me.</p>
https://stackoverflow.com/questions/30703347/-/30703533#307035331haraldhttps://stackoverflow.com/users/2702802015-06-08T07:37:29Z2015-06-08T07:37:29Z<p>Try:</p>
<pre><code>psql postgres <user_name>
</code></pre>
<p>Where <code>postgres</code> is the name of the main database and <code><user_name></code> is the user that owns the postgres installation. Usually this will be <code>postgres</code> or <code>psql</code> too, but it they don't work, try your own user name. (I'm not sure this is set up on a Windows system.)</p>
https://stackoverflow.com/questions/30703347/-/37006635#370066351JGOakleyhttps://stackoverflow.com/users/14406812016-05-03T14:12:42Z2016-05-03T14:12:42Z<p>Most likely the installation created a default role called "postgres". Try running the psql command with the username option:</p>
<pre><code>psql -U postgres
</code></pre>
<p>Then when asked for the password use the one you specified during the installation.</p>