Ysql_hba_conf_csv ysqlsh unable to connect with -d

We have configured the hba_conf and able to connect using the certs with below command

/data/yugabyte-2.25.1.0/bin/ysqlsh
-h
-p
-U yugabyte
“sslcert= sslkey= sslrootcert= sslmode=verify-ca”

but I add “-d” option to connect to specifc database (even yugabyte), then the command fail with “no pg_hba.conf entry”. Seems like it is ignoring the ssl argument

/data/yugabyte-2.25.1.0/bin/ysqlsh
-d yugabyte
-h
-p
-U yugabyte
“sslcert= sslkey= sslrootcert= sslmode=verify-ca”

ysqlsh: warning: extra command-line argument “sslcert= sslkey= sslrootcert= sslmode=verify-ca” ignored
ysqlsh: error: connection to server at “host1” (x.x.x.x), port failed: FATAL: connection requires a valid client certificate
connection to server at “” (x.x.x.x), port failed: FATAL: no pg_hba.conf entry for host “x.x.x.x”, user “yugabyte”, database “”, no encryption

In this case, if client (db-user) is trying to connect to specific database, it will fail. Is there any other specific argument we need to follow to connect to the specified database.

Hi explore_yb,
Could you try with the connection string format like

ysqlsh "host=<hostname> port=<port> user=yugabyte dbname=yugabyte sslcert=<path> sslkey=<path> sslrootcert=<path> sslmode=verify-ca"

it worked, thank you @prem