当前位置: 代码迷 >> SQL >> root用户不能使用psql或许pg_dump等pg命令
  详细解决方案

root用户不能使用psql或许pg_dump等pg命令

热度:205   发布时间:2016-05-05 09:44:40.0
root用户不能使用psql或者pg_dump等pg命令
root用户不能使用psql或者pg_dump等pg命令

[[email protected] html]# ./getdata.sh
./getdata.sh: line 6: psql: command not found
[[email protected] html]# vi getdata.sh
[[email protected] html]# psql -U postgres
-bash: psql: command not found

[[email protected] html]# find / -name "psql"
/home/pgsql/9.1/bin/psql
[[email protected] html]# ln -s /home/pgsql/9.1/bin/psql /usr/sbin/psql   做一个软链接即可


root用户不能使用pg_dump
[[email protected] bk_pg]# cat bk.log
./backup.sh: line 20: pg_dump: command not found
[[email protected] html]# ln -s /home/pgsql/9.1/bin/pg_dump /usr/sbin/pg_dump 即可
  相关解决方案