Academia JavaEE Workspace in MacOS: Difference between revisions
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
==PostgreSQL== | ==PostgreSQL== | ||
===Install=== | ===Install=== | ||
<source lang="bash" highlight=" | <source lang="bash" highlight="8-10,12" line> | ||
brew services stop postgresql | brew services stop postgresql | ||
brew uninstall postgresql | brew uninstall postgresql | ||
Line 7: | Line 7: | ||
rm -rf ~/Library/LaunchAgents/homebrew.mxcl.postgresql* | rm -rf ~/Library/LaunchAgents/homebrew.mxcl.postgresql* | ||
rm -rf /usr/local/var/postgres* | rm -rf /usr/local/var/postgres* | ||
brew install postgres | brew install postgres | ||
brew services start postgresql | brew services start postgresql | ||
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist |
Revision as of 10:16, 5 January 2021
PostgreSQL
Install
brew services stop postgresql
brew uninstall postgresql
rm -rf ~/Library/LaunchAgents/homebrew.mxcl.postgresql*
rm -rf /usr/local/var/postgres*
brew install postgres
brew services start postgresql
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
brew services list
createdb $USER
Schema
CREATE DATABASE academia;
CREATE USER academia WITH ENCRYPTED PASSWORD 'academia';
GRANT ALL PRIVILEGES ON DATABASE academia TO academia;
psql academia < academia.sql