Created
April 17, 2020 17:29
-
-
Save ameernormie/3c307d5aeddda55fe02037f13293da3e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Postgresql | |
### Install | |
brew install postgresql | |
postgres --version | |
brew services start postgresql | |
### Upgrade | |
brew upgrade postgresql | |
brew postgresql-upgrade-database | |
brew services restart postgresql | |
### Create a physical postgresql database | |
initdb /usr/local/var/postgres | |
### Start/Stop postgresql | |
pg_ctl -D /usr/local/var/postgres start | |
pg_ctl -D /usr/local/var/postgres stop | |
### Create actual database | |
Create ==> createdb mydatabasename | |
Remove ==> dropdb mydatabasename | |
Connect ==> psql mydatabasename | |
CREATE DATABASE mydatabasename; | |
DROP DATABASE mydatabasename; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment