pg_ctl

作者: hehehehe | 来源:发表于2022-08-17 15:04 被阅读0次

在UNIX平台中安装PostgreSQL之后,PostgreSQL会在UNIX系统中创建一个名为“postgres”当用户。PostgreSQL的默认用户名和数据库也是“postgres”,不过没有默认密码。

Mac中使用su命令提示su:Sorry的解决办法

sudo su postgres 
bash-3.2$ 
pg_ctl -D ./data restart
sudo su - postgres
xxxMacBook-Pro:~ postgres$ 
/Library/PostgreSQL/12/bin/pg_ctl -D /Library/PostgreSQL/12/data restart
create extension postgis;
select st_geomfromtext('point(1 1)');

查看 机器实例

show data_directory;
select setting from pg_settings where name='data_directory';

相关文章

网友评论

      本文标题:pg_ctl

      本文链接:https://www.haomeiwen.com/subject/rfwjgrtx.html