本機連接虛擬機瀚高數據庫


在虛擬機安裝好數據庫

修改兩個文件  路徑:opt  HighGoDB-4.3.4  data  下的 pg_hba.conf 和 postgresql.conf

在pg_hba.conf   

# IPv4 local connections:
hostssl all all 127.0.0.1/32 md5 下添加  host all all 0.0.0.0/0 md5 

在postgresql.conf里面

listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
port = 5866 # (change requires restart)
max_connections = 1000   找到該部分並修改成我這樣的  

重新啟動數據庫  命令:systemctl restart hgdb-enterprise-5.6.5.service  說明:不同版本 hgdb-enterprise-5.6.5.service  不一樣  這是文件名

將虛擬機防火牆 public 下端口 添加 數據庫的默認端口 5866    重啟防火牆

然后就訪問數據庫  肯定訪問不到   然后網上搜主機ping不通虛擬機  自己跟着在虛擬網絡編輯器 里面配置  就可以了 

 

 

給highgo數據庫建立表空間  先給文件夾賦數據庫用戶的權限

例  chown highgo /opt/tablespace

然后建立表空間  例 

CREATE TABLESPACE 名字LOCATION '路徑'

 

 

 

https://www.cnblogs.com/w-yu-chen/p/13815156.html

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM