database psql:服务器不支持 SSL,但需要 SSL

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36350600/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 08:01:32  来源:igfitidea点击:

psql: server does not support SSL, but SSL was required

databasesslpostgresql-9.5

提问by Jyotirmay

Trying to connect to postgresql server using command prompt.

尝试使用命令提示符连接到 postgresql 服务器。

Command used:

使用的命令:

psql "sslmode=require host=localhost dbname=test"

psql "sslmode=require host=localhost dbname=test"

Error thrown:

抛出错误:

psql: server does not support SSL, but SSL was required

psql:服务器不支持 SSL,但需要 SSL

enter image description here

在此处输入图片说明

Please help me out on this. Thanks.

请帮我解决这个问题。谢谢。

采纳答案by Burki

This linksuggests that you might try

链接建议您可以尝试

psql "sslmode=disable host=localhost dbname=test"

or (probably better)

或(可能更好)

psql "sslmode=allow host=localhost dbname=test"

That way you should be able to connect to your server.

这样你应该能够连接到你的服务器。