失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > pgadmin3连接mysql_如何使用pgAdmin3连接到Ubuntu上的远程PostgreSQL数据库?

pgadmin3连接mysql_如何使用pgAdmin3连接到Ubuntu上的远程PostgreSQL数据库?

时间:2019-04-16 02:06:18

相关推荐

pgadmin3连接mysql_如何使用pgAdmin3连接到Ubuntu上的远程PostgreSQL数据库?

我正在尝试在Ubuntu机器上设置PostgreSQL数据库.我希望能够使用pgAdmin3从远程计算机访问它.我该如何设置?

我在Ubuntu上安装了PostgreSQL数据库:

sudo apt-get install postgresql

在我的/etc/postgresql/9.1/main/pg_hba.conf中我有这一行:

host all all all password

因此它应接受来自所有IPv4地址的连接,并且密码应以明文形式发送(这是出于开发原因).

如果我运行此命令以查看正在运行的服务:

sudo netstat -tulpn

我可以看到这些行,这表明PostgreSQL正在接受默认端口上的连接:

tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN

3561/postgres

当我尝试从同一本地网络上的远程计算机连接到此PostgreSQL服务器时,我收到以下错误消息:

Server doesn’t listen

The server doesn’t accept connections: the connection library reports

could not connect to server: Connection refused Is the server running on host “10.0.1.7” and accepting TCP/IP connections on port 5432?

我使用postgres作为用户名而没有密码.但我也试过postgres作为密码.在本地服务器上,我可以使用:

sudo -u postgres psql postgres

如何使用pgAdmin3从远程计算机连接到在Ubuntu上运行的PostgreSQL数据库?

如果觉得《pgadmin3连接mysql_如何使用pgAdmin3连接到Ubuntu上的远程PostgreSQL数据库?》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。