環境:linux 下 登錄 postgres 賬戶
操作:root 下輸入:sudo -u postgres psql 或 su postgres
問題:顯示 could not change directory to "/root": Permission denied
原因:root 下操作,仍然在root文件夾下面,改爲 su - postgres,以保證登錄正確的環境
解決方法:su - postgres
環境:linux 下 登錄 postgres 賬戶
操作:root 下輸入:sudo -u postgres psql 或 su postgres
問題:顯示 could not change directory to "/root": Permission denied
原因:root 下操作,仍然在root文件夾下面,改爲 su - postgres,以保證登錄正確的環境
解決方法:su - postgres
https://www.pgadmin.org/download/ https://www.pgadmin.org/docs/pgadmin4/4.x/