我想使用SQLDeveloper与PostgreSQL数据库建立连接,但是当我要选择数据库时,它没有显示我可以选择的任何数据库。 我的操作系统是CentOS 6,SQLDeveloper 17.4.1.054,而我的jdbc是42.2.4.jar 。我在CentOS的端口5432上安装了PostgreSQL 10.4
我真的很陌生,所以我不知道我做错了什么。预先感谢Screenshot of the SQLDeveloper
答案 0 :(得分:0)
首先在所需的数据库上尝试psql
这是我在Postgres上的本地数据库的列表
$ psql
psql (10.3)
Type "help" for help.
bamcgill=# show databases
bamcgill-# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
bamcgill | bamcgill | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | bamcgill | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | bamcgill | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/bamcgill +
| | | | | bamcgill=CTc/bamcgill
template1 | bamcgill | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/bamcgill +
| | | | | bamcgill=CTc/bamcgill
world | bamcgill | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
(5 rows)
bamcgill-# \c world
You are now connected to database "world" as user "bamcgill".
world-# \dt
List of relations
Schema | Name | Type | Owner
--------+-----------------+-------+----------
public | city | table | bamcgill
public | country | table | bamcgill
public | countrylanguage | table | bamcgill
(3 rows)
world-#
答案 1 :(得分:0)
我试图重新配置位于/ var / lib / pgsql / 10 / data /
的pg_hba.conf。我将IPv4部分的方法从“ ident”更改为“ trust”
for (int i = 0; i < img_left.cols; i++) {
for (int j = 0; j < img_left.rows; j++) {
kpl.push_back(KeyPoint(i,j,1));
kpr.push_back(KeyPoint(i,j,1));
}
}
之后,我重新启动了PostgreSQL服务,并设法从SQLDeveloper建立到PostgreSQL的连接