heidisql for Postgresql

sakim's profile image sakim posted 3 weeks ago in General Permalink

When connecting to a PostgreSQL database from HeidiSQL, I want to use TCP/IP communication instead of TLS communication. However, since PostgreSQL has SSL enabled by default, I would like to communicate in TCP/IP mode using the HeidiSQL tool. Unfortunately, there is no option to explicitly disable SSL mode in HeidiSQL. Even when the "Use SSL" option is unchecked, packets are still being sent and received using the TLS v1.3 protocol. Is there a way to configure HeidiSQL to connect using only the TCP/IP protocol or by modifying a configuration file?

ansgar's profile image ansgar posted 3 weeks ago Permalink

Ah I think the sslmode keyword in the connection string is causing that: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLMODE

sslmode

This option determines whether or with what priority a secure SSL TCP/IP connection
will be negotiated with the server. There are six modes:

disable
    only try a non-SSL connection
allow
    first try a non-SSL connection; if that fails, try an SSL connection
prefer (default)
    first try an SSL connection; if that fails, try a non-SSL connection
require
    only try an SSL connection. If a root CA file is present, verify the
     certificate in the same way as if verify-ca was specified
verify-ca
    only try an SSL connection, and verify that the server certificate is
     issued by a trusted certificate authority (CA)
verify-full
    only try an SSL connection, verify that the server certificate is
    issued by a trusted CA and that the requested server host name matches
    that in the certificate

HeidiSQL currently does not set sslmode with an unchecked "SSL" checkbox, which tells libpq implicitly to use "prefer" by default.

A solution could be to set "disable" with an unchecked SSL checkbox.

You will need to post that to the issue tracker as a feature request.

sakim's profile image sakim posted 3 weeks ago Permalink

thx, it provided me with a clear understanding and valuable guidance, which I deeply appreciate

Please login to leave a reply, or register at first.