參考:
檢視所有資料庫:su - postgres
postgres@ubuntu:~$ psql
\c + 資料庫名
進入資料庫。
參考:列出所有使用者:
參考:\c bitbucket_6_1_1 # 選擇資料庫
'license'
;# 查詢
'***' where prop_key =
'license'
;# 重新設定值
建立使用者、資料庫,並授權。
參考:找到對應的pg_hba.conf檔案:
然後新增postgresql客戶端的ip範圍:
加一行:
host all all 192.168.85.0/24 md5
在centos上,這個目錄是
/var/lib/pgsql/
參考:
postgresql常用命令
最近一直在學習postgresql,下面是自己整理的postgresql的常用命令 連線資料庫,預設的使用者和資料庫是postgres psql u user d dbname 切換資料庫,相當於mysql的use dbname c dbname 列舉資料庫,相當於mysql的show databa...
postgresql常用命令
最近一直在學習postgresql,下面是自己整理的postgresql的常用命令 連線資料庫,預設的使用者和資料庫是postgres psql u user d dbname 切換資料庫,相當於mysql的use dbname c dbname 列舉資料庫,相當於mysql的show databa...
postgresql常用命令
最近一直在學習postgresql,下面是自己整理的postgresql的常用命令 連線資料庫,預設的使用者和資料庫是postgres psql u user d dbname 切換資料庫,相當於mysql的use dbname c dbname 列舉資料庫,相當於mysql的show databa...