Academia JavaEE Workspace in MacOS

From Chorke Wiki
Jump to navigation Jump to search

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

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
brew services list

createdb $USER
psql

Schema

CREATE DATABASE academia;
CREATE USER academia WITH ENCRYPTED PASSWORD 'academia';
GRANT ALL PRIVILEGES ON DATABASE academia TO academia;
psql academia < academia.sql