如何从命令行 运行 postgresql 并了解 Windows 中的可用数据库
How to run postgresql from Command line and know available Databases in Windows
我是 postgreSQL 的新手,很难在我的 Eclipse 中创建连接。
这是我到目前为止所做的:
- 从市场安装了用于 eclipse 的 DBeaver 插件。
安装 PostgreSQL 版本 10
现在我尝试在 Eclipse 中创建连接,但出现错误 "FATAL: password authentication failed for user "testuser"
我通过类似的线程进行了检查(
Getting authentication failed error with postgresql from command line
) 但无法解决问题。
你能帮忙吗
要通过命令行连接 PostgreSQL,您必须安装 PostgreSQL 提供的名为 "psql" 的工具(如果尚未安装)。
然后使用以下命令连接到 PostgreSQL 数据库。
psql -h localhost -p 5432 -U postgres
解释:
localhost: is the hostname of machine where PostgreSQL is installed.
5432 : is the default PostgreSQL port
postgres : is the username of to connect to DB
您的问题的解决方案:
FATAL: password authentication failed for user "testuser"
如指定的错误消息所示,数据库中不存在用户或您提供的连接密码不正确。重新验证您的用户名和密码,然后重试。
祝一切顺利。
我是 postgreSQL 的新手,很难在我的 Eclipse 中创建连接。
这是我到目前为止所做的:
- 从市场安装了用于 eclipse 的 DBeaver 插件。
- 安装 PostgreSQL 版本 10
现在我尝试在 Eclipse 中创建连接,但出现错误 "FATAL: password authentication failed for user "testuser"
我通过类似的线程进行了检查( Getting authentication failed error with postgresql from command line ) 但无法解决问题。
你能帮忙吗
要通过命令行连接 PostgreSQL,您必须安装 PostgreSQL 提供的名为 "psql" 的工具(如果尚未安装)。
然后使用以下命令连接到 PostgreSQL 数据库。
psql -h localhost -p 5432 -U postgres
解释:
localhost: is the hostname of machine where PostgreSQL is installed.
5432 : is the default PostgreSQL port
postgres : is the username of to connect to DB
您的问题的解决方案:
FATAL: password authentication failed for user "testuser"
如指定的错误消息所示,数据库中不存在用户或您提供的连接密码不正确。重新验证您的用户名和密码,然后重试。
祝一切顺利。