brew search postgresql
brew install postgresql@12
echo 'export PATH="/usr/local/opt/postgresql@12/bin:$PATH"' >> ~/.zshrc
重启终端
brew services start postgresql@12
createdb 当前用户名
psql
CREATE USER postgres WITH PASSWORD 'postgres';
ALTER ROLE postgres WITH SUPERUSER;
网友评论