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"> | <source lang="bash" highlight="9-11,13" line> | ||
brew services stop postgresql | brew services stop postgresql | ||
brew uninstall postgresql | brew uninstall postgresql | ||
Line 10: | Line 10: | ||
brew services list | brew services list | ||
brew services start postgresql | |||
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | ||
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | ||
brew services list | brew services list | ||
createdb $USER | createdb $USER | ||
</source> | </source> | ||
Revision as of 10:15, 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 list
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