It is most likely ssl related , or maybe ssl-verify-server. Both of which used to be off by default, but now on by default.
Some people already complained that
switching off SSL helped to speed server (or client, or both) up (. We do not know what it is, maybe it is large integer math which is slow, but maybe the client is trying to read CRL from the internet, while doing full-blown certificate validation) But maybe you can help us understand, since you're affected.
You probably need to restart server with --connect-timeout=1000 or something like that
Can you run command line client with
a) --ssl=0
b) --ssl=1 --ssl-verify-server-cert=1
c) --ssl=1 --ssl-verify-server-cert=0
Can you report connect time with all these configurations? Best, you do it in a bug report here
https://jira.mariadb.org/ ?
HeidiSQL perhaps does not do this auto-SSL, or maybe it just uses an older client library.
Thank you!