Last active
September 19, 2021 16:49
-
-
Save ideaMarcos/aad868bbb65e502ba01ab7333b6676ec to your computer and use it in GitHub Desktop.
homebrew postgresql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
brew install postgresql | |
brew services start postgresql | |
createdb `whoami` | |
# https://stackoverflow.com/questions/15301826/psql-fatal-role-postgres-does-not-exist | |
psql # to test login works | |
createuser -s postgres | |
psql -U postgres # to test login works | |
# https://blog.testdouble.com/posts/2021-01-28-how-to-completely-uninstall-homebrew-postgres/ | |
brew uninstall postgres | |
rm -rf /usr/local/var/postgres | |
rm /usr/local/var/log/postgres.log | |
rm -f ~/.psqlrc ~/.psql_history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment