繁体   English   中英

无法从远程服务器访问PostgreSQL数据库,但是我可以使用pgAdmin客户端访问

[英]Unable to access PostgreSQL database from remote server but i'm able to access with pgAdmin client

db=QSqlDatabase::addDatabase("QPSQL","MainDB");

db.setHostName("xxx.xxx.xxx.xxx");// remote pc ip
db.setPort(5432);
db.setDatabaseName("Users");
db.setUserName("postgres");
db.setPassword("test");
if(!db.open())
{
   qDebug()<<"Unable to open database";
}

我知道了 我将所有DLL从C:\\ PosgreSql 9.3 \\ bin复制到了我的应用程序,并且可以正常工作。

感谢大伙们!!!!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM