Skip to content

使用该库连接高斯数据库(GaussDB Kernel 505.2.1 build 1da42ed9)报错 #4

@baiguangh

Description

@baiguangh

我用这个库尝试连接高斯数据库,一直报错,麻烦老师看下什么原因:

  1. 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

  2. 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

  3. 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" }) }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions