Hits: 66

QNAP 程序库安装的postgresql

[/share/CACHEDEV1_DATA/.qpkg/postgresql/data] #  /postgresql.sh {start|stop|restart}

vi /etc/config/qpkg.conf  搜索postgresql,

[PostgreSQL]
Name = postgresql
Class = null
Status = complete
Build = 20190724
Version = 11.4.1
Author = QNAP Systems, Inc.
QPKG_File = postgresql.qpkg
Date = 2019-09-19
Shell = /share/CACHEDEV1_DATA/.qpkg/postgresql/postgresql.sh
Volume_Select = 3
Install_Path = /share/CACHEDEV1_DATA/.qpkg/postgresql
WebUI = /
RC_Number = 102
Timeout = 180,180
Enable = TRUE
Display_Name = PostgreSQL
Web_Port = 7070
FW_Ver_Min = 4.4.1
FW_Ver_Max = 4.5.0
Dependency = container-station

找不到psql程序

docker 建立 postgresql

YAML

dd

QPostgreSQL         https://www.qnapclub.eu/fr/qpkg/239

/share/CACHEDEV1_DATA/.qpkg/QPostgreSQL/bin/psql
/share/CACHEDEV1_DATA/.qpkg/QPostgreSQL/bin/pg_dump

postgres 修改密码,忘记密码

PostgreSQL默认的超级管理员密码是postgres
连接方法:
su – postgres 或 sudo su – postgres
psql -U postgres(注意,是大写的-U)默认密码为空
修改密码的方法是,用psql登入管理:psql -U postgres
然后用这样的命令来修改密码:alter user postgres with password ‘new password’

首先打开data目录下的pg_hba.conf配置文件,找到:# IPv4 local connections: host all all 127.0.0.1/32 md5
然后把md5改成trust,重新启动。  psql -d template1 -U postgres -c “alter role postgres password ‘123456’;”

用客户端pgadmin修改