title: 5: Input/output error Error: Failure while executing; `/bin/launchctl bootstrap gui/502 and FATAL: password authentication failed for user
body: <p>The error 5: Input/output Error: Failure while executing; <code>/bin/launchctl bootstrap gui/502 /Users/Andrea/Library/LaunchAgents/homebrew.mxcl.postgresql.plist</code> exited with 5 is occurring when typing in the command &quot;brew services start postgresql&quot;.</p>
  <p>I am trying to create a database using homebrew and postgresql. If I type the command &quot;brew services stop postgresql&quot; and then start it back up the error does not occur. But will reoccur on the initial start of postgresql.</p>
  <p>After, I stop postgresql and restart it using homebrew I type in &quot;createdb 'test'. This error appears:</p>
  <p>&quot;error: could not connect to database template1: FATAL:  password authentication failed for user &quot;Andrea&quot;. Initially I tried to primarily work on the password authentication with no luck.</p>
  <p>Here are the steps I have taken:</p>
  <ol>
  <li>I have changed the method column to trust in my hba_pg files.</li>
  <li>I have tried the command ALTER in the terminal to change the password.</li>
  <li>I created a root login on my computer, where I tried to access the file and use the root's password to create the database.</li>
  <li>The command chpass to change my user's password.</li>
  </ol>
  <p>Help would be much appreciated. Thank you!</p>