mac 启动 postgresql

initdb --locale=C -E UTF-8 /usr/local/var/postgres

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    pg_ctl -D /usr/local/var/postgres -l logfile start

配置文件所在路径

/usr/local/var/postgresql\@14/postgresql.conf 

 

创建用户

/usr/local/opt/postgresql@14/bin/createuser postgres

 

启动或重启服务

/usr/local/opt/postgresql\@14/bin/postgres -D /usr/local/var/postgres

brew services restart postgresql

 

https://blog.csdn.net/qq_41037744/article/details/119533311

 

 
posted @ 2023-09-13 00:32  Orientation  阅读(316)  评论(0编辑  收藏  举报