Mac 安装 postgres

安装

arch -arm64 brew install postgresql

初始化数据库

initdb --locale=C -E UTF-8 /opt/homebrew/var/postgres

启动服务

brew services start postgresql

客户端登录

psql postgres

创建用户

CREATE ROLE postgres WITH LOGIN PASSWORD 'postgres';
ALTER ROLE postgres CREATEDB;

使用 navcat 链接

posted @ 2023-08-11 09:39  vx_guanchaoguo0  阅读(46)  评论(0编辑  收藏  举报