当前位置:网站首页>连PostgreSQL问题:expected authentication request from server, but received v
连PostgreSQL问题:expected authentication request from server, but received v
2022-07-29 01:44:00 【若苗瞬】
(一)现象
某台Linux虚拟机上的C++程序无法连接PostgreSQL14数据库 ️
报错:expected authentication request from server, but received v
并观察到下列现象:
- 同台主机同一个程序,改连接本地openGauss3.0.0数据库正常。
- 同台主机上的Java程序可以正常连接PostgreSQL14数据库。
- 其它虚拟机/实体机的其它程序均可正常连接PostgreSQL14数据库。
(二)分析
其实拖了很久才搞懂的……
经过分析,该虚拟机上安装了openGauss3.0.0服务端。
设置了:export LD_LIBRARY_PATH=$GAUSSHOME/lib:$LD_LIBRARY_PATH
导致C++程序找库的时候没找到PostgreSQL的库,而是错找成了openGauss的库,
(三)解决
- 不要将openGauss的库目录加入
LD_LIBRARY_PATH,但是openGauss服务端就无法启动了。 - 执行C++程序的用户,和安装openGauss的用户分开,防止互相干扰。
边栏推荐
猜你喜欢

Cookies and sessions

一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力

Try to understand the essence of low code platform design from another angle

Excel 打开包含汉字的 csv 文件出现乱码该怎么办?

Mathematical modeling - location of police stations

Solution of Lenovo notebook camera unable to open

MotionLayout--在可视化编辑器中实现动画
![[one · data | chained binary tree]](/img/83/d62a47f1264673f1e898335303a7a6.png)
[one · data | chained binary tree]

指针——黄金阶段

RGBD点云降采样
随机推荐
Idea connection database
webview攻击
防止重复点击
Leetcode/0 and 1 consecutive subarrays with the same number
[cloud native] what is the microservice architecture
Using local cache + global cache to realize user rights management of small systems
mobile-picker.js
Sharpness evaluation method without reference image
记一次 ERROR scheduler.AsyncEventQueue: Dropping event from queue shared导致OOM
C语言提高篇(一)
ES6 语法扩展
Mathematical modeling -- Optimization of picking in warehouse
【上传图片可剪裁-1】
Excel 打开包含汉字的 csv 文件出现乱码该怎么办?
Vector similarity evaluation method
Understand the clock tree in STM32 in simple terms
第十四天:续第十三天标签相关知识
Flexible layout single selection
Understand the working principle of timer in STM32 in simple terms
弹性布局 单选