安装
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 链接
![](/i/l/?n=23&i=blog/2697130/202308/2697130-20230811093841979-1368573185.png)
标签:2697130,postgresql,postgres,Mac,ROLE,安装,###
From: https://www.cnblogs.com/guanchaoguo/p/17622241.html