PostgreSQL Installation
PostgreSQL
Installation
MacOS
brew install postgresql
brew services start postgresql
brew cask install pgadmin4
# HostName 127.0.0.1
# Port 5432
# DataBase postgre
# UserName ${MAC_USER_NAME}
User Guide
PostgreSQL 11.2 手册
PostgreSQL 11.5 Documentation
# MacOS
psql postgres
## Init
CREATE USER marxiotadmin WITH ENCRYPTED PASSWORD 'marxiot1688';
\du
CREATE DATABASE marxiot OWNER marxiotadmin;
\l
GRANT ALL PRIVILEGES ON DATABASE marxiot TO marxiotadmin;
\l
# Clean
REVOKE ALL ON DATABASE marxiot from marxiotadmin;
\l
DROP DATABASE IF EXISTS marxiot;
\l
DROP USER marxiotadmin;
\du