postgresql - 如何从外部网络查看 postgresql 数据库中的所有表?
问题描述
我在本地网络之一中托管了 PostgreSQL 数据库。在fourm和其他博客的帮助下。我可以管理从其他计算机连接数据库。我修改了 PostgreSQL 配置文件以允许所有 IP 访问数据库。
我可以连接到数据库。但我无法查看其中的任何表格。我正在使用 pgAdmin 工具进行连接。Pgadmin 工具正在连接,我看到所有活动,但我可以查看任何表。
解决方案
请在下面找到详细信息。
root@OpenProject:/home/XXXXXXXX# psql -h 192.168.1.146 -d openproject -U vivek
Password for user vivek:
psql (12.1 (Ubuntu 12.1-1.pgdg18.04+1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.
openproject=> \l openproject=> \c SSL connection (protocol: TLSv1.3,
cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off) You are
now connected to database "openproject" as user "craftsilicon".
openproject=> \dt Did not find any relations. openproject=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-------------+----------+----------+---------+-------+---------------------------
openproject | postgres | UTF8 | en_IN | en_IN | =Tc/postgres +
| | | | | postgres=CTc/postgres +
| | | | | craftsilicon=CTc/postgres
postgres | postgres | UTF8 | en_IN | en_IN |
template0 | postgres | UTF8 | en_IN | en_IN | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_IN | en_IN | =c/postgres +
| | | | | postgres=CTc/postgres
(4 rows)
openproject=> \c SSL connection (protocol: TLSv1.3, cipher:
TLS_AES_256_GCM_SHA384, bits: 256, compression: off) You are now
connected to database "openproject" as user "craftsilicon".
openproject=> \dt Did not find any relations.
我不知道,openproject 的表存储在哪里,我想访问这些表。
推荐阅读
- html - 使用column-count css标签时文本列的垂直对齐?
- javascript - 尝试在图像上使用不透明度进行过渡
- datetimepicker - 删除 DateTimePicker 的底线
- sql-server - SQL Server:按子查询结果选择列名
- c# - 如何在 ASP.Net MVC 5.2.7 (.Net Framework) 中处理表单中的双数?
- c# - X 次迭代后,整个应用程序崩溃,没有任何异常(错误代码 0x3)C# UWP
- .net-core - 如何使用 Visual Studio 2019 打开开源 .NET Core 库?
- sqlite - 你能从sqlite数据库中解析一个int,原来是一个bool,在查询数据库后重新变成bool吗?
- npm - NPM 服务重写问题
- python - Tkinter 滚动条没有可拖动部分