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

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

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

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


root用户不能使用pg_dump
[root@mysqltest bk_pg]# cat bk.log
./backup.sh: line 20: pg_dump: command not found
[root@pgtina html]# ln -s /home/pgsql/9.1/bin/pg_dump /usr/sbin/pg_dump 即可

猜你喜欢

转载自906179271.iteye.com/blog/2266200