title: Failed authentication for user when typing psql in the terminal (mac)
body: <p>Disclaimer: I looked into numerous StackOverFlow posts, but none of them helped me solving the issue :/
  And I'm running this on mac Sierra</p>
  
  <p>I'm trying to access PostgreSQL in the terminal by typing <code>psql</code>.
  Whenever I type <code>psql</code>, I get a following error:</p>
  
  <pre><code>psql: FATAL:  password authentication failed for user "JohnSmith"
  password retrieved from file "/Users/JohnSmith/.pgpass"
  </code></pre>
  
  <p>In .pgpass file, here is the content:</p>
  
  <pre><code>localhost:(portnumber):*:JohnSmith:(password)
  localhost:(portnumber):*:postgres:(password)
  </code></pre>
  
  <p>I confirm that the password for JohnSmith in pgpass is same as my Mac user password. </p>
  
  <p>Can anyone guess what I'm doing wrong here?</p>