温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

postgresql服务器版本和psql版本不一致解决办法

发布时间:2020-07-31 18:42:04 来源:网络 阅读:2329 作者:断臂人 栏目:数据库

$ psql -U peimsmdata -h 127.0.0.1 peimsm

could not change directory to "/root"

Password for user peimsmdata:

psql (9.2.23, server 9.6.3)

WARNING: psql version 9.2, server version 9.6.

         Some psql features might not work.

Type "help" for help.

原因:

虽然系统安装了9.6版本的pgsql,但是psql这个脚本却引用了旧的版本。

解决方法:

替换系统中旧版本的psql脚本为新的版本。

$ psql --version

could not change directory to "/root"

psql (PostgreSQL) 9.2.23

# which -a psql

/usr/bin/psql

/usr/local/postgresql/bin/psql

/bin/psql

# mv /usr/bin/psql /usr/bin/psql.bak

# ln -s /usr/local/postgresql/bin/psql /usr/bin/psql

$ psql -U peimsmdata -h 127.0.0.1 peimsm

could not change directory to "/root": Permission denied

Password for user peimsmdata:

psql (9.6.3)

Type "help" for help.


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI