简体   繁体   English

Sql 开发人员连接到远程 postgresql

[英]Sql developer connection to remote postgresql

I was trying to make connection to remote postgresql on aws and sql developer.我试图在 aws 和 sql developer 上连接到远程 postgresql。 I have created a user with name ' demo ' and a database with name ' demodatabase ' owned by demo .我创建了一个名为“ demo ”的用户和一个名为“ demodatabase ”的数据库,由demo拥有。

But i am facing some issue, when making connection, choose database dropdown in sql developer isn't showing any database name.但是我遇到了一些问题,在建立连接时,在 sql developer 中选择数据库下拉列表没有显示任何数据库名称。

在此处输入图片说明

If i don't choose any database from dropdown and test the connection, it shows an error如果我没有从下拉列表中选择任何数据库并测试连接,它会显示错误

" Status : Failure -Test failed: FATAL: database "dbadmin" does not exist ". 状态:失败 - 测试失败:致命:数据库“dbadmin”不存在“。

But if i create a database with the same name as user ie demo it's getting connected successfully.但是如果我创建一个与用户同名的数据库,即演示,它会成功连接。

I have tested in pgadminIII also, with that it's working absolutely fine.我也在 pgadminIII 中进行了测试,它工作得非常好。 Could anyone please help me out.任何人都可以帮助我。

I got this to work by not specifying a port in that textbox, but including it and the database name in the hostname textbox:我通过不在该文本框中指定端口,而是在主机名文本框中包含它和数据库名称来实现此目的:

myserver:1234/databasename? myserver:1234/数据库名称?

In the host name box, put the host name followed by /databasename?在主机名框中,将主机名后跟 /databasename? (include the question mark) ... so in your case: (包括问号)......所以在你的情况下:

host: whatever.amazonaws.com/demodatabase?主持人:whatever.amazonaws.com/demodatabase?

You can then ignore the drop down box next to "choose database"然后您可以忽略“选择数据库”旁边的下拉框

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

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