Academia JavaEE Workspace in MacOS: Difference between revisions
Jump to navigation
Jump to search
(Created page with "==PostgreSQL== <source lang="bash"> brew services stop postgresql brew uninstall postgresql rm -rf ~/Library/LaunchAgents/homebrew.mxcl.postgresql* rm -rf /usr/local/var/pos...") |
|||
Line 1: | Line 1: | ||
==PostgreSQL== | ==PostgreSQL== | ||
===Install=== | |||
<source lang="bash"> | <source lang="bash"> | ||
brew services stop postgresql | brew services stop postgresql | ||
Line 12: | Line 13: | ||
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | ||
brew services list | brew services list | ||
createdb $USER | |||
psql | |||
</source> | |||
===Schema=== | |||
<source lang="sql"> | |||
CREATE DATABASE academia; | |||
CREATE USER academia WITH ENCRYPTED PASSWORD 'academia'; | |||
GRANT ALL PRIVILEGES ON DATABASE academia TO academia; | |||
</source> | </source> | ||
psql academia < academia.sql |
Revision as of 10:11, 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
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