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