-
Notifications
You must be signed in to change notification settings - Fork 4
Description
我用这个库尝试连接高斯数据库,一直报错,麻烦老师看下什么原因:
-
let result = connect(
"host=localhost port=5433 user=gaussdb password=Gaussdb@123 dbname=postgres",
NoTls,
)).await.unwrap();
报错:error parsing response from server: invalid message length: expected to be at end of iterator for sasl -
let result = connect(
"host=localhost port=5433 user=gaussdb password=Gaussdb@123 dbname=postgres sslmode=disable",
NoTls,
).await.unwrap();
报错:error parsing response from server: invalid message length: expected to be at end of iterator for sasl -
let connector = native_tls::TlsConnector::builder()
.danger_accept_invalid_certs(true)
.danger_accept_invalid_hostnames(true)
.build()
.unwrap();
let connector = MakeTlsConnector::new(connector);
let (client, connection) = tokio_gaussdb::connect(
"host=localhost port=5433 user=gaussdb password=Gaussdb@123 dbname=postgres",
connector,
).await.unwrap();
报错:Error { kind: Parse, cause: Some(Custom { kind: InvalidData, error: "invalid message length: expected to be at end of iterator for sasl" }) }