In this article, we will consider connecting to the MySQL DBMS using the HeidiSQL program over the SSH tunnel.
Make sure that pagent is running and the key is active. We start HeidiSQL.

Choose the default session Unnamed or create a new one and proceed with the configuration.
In the Settings tab, select Network Type MariaDB or MySQL (SSH tunnel)

Next, go to the SSH tunnel tab that appears and fill in the data from the server received in the letter.
Data to access the server through Putty / WinSCP
IP: 11.12.23.34
Server Login: testuser
passwd: use key
========================================
Route access to MySQL (connect via SSH tunnel)
Hostname = localhost
Username = mysqltest
password: example123

If the Location plink.exe field is empty, specify the path manually, this program is located in the PuTTy installation directory (usually C: \ Program Files (x86) \ PuTTy \ plink.exe as shown in the picture). Fill in the remaining fields as in the example. The path to the private key file is optional (it may not work on older versions of HeidiSQL). The SSH tunnel setup is over.
The next step, go to the Settings tab and fill in the data for connecting to MySQL server.

We enter data according to the example from the picture, click Save and try to open a session (connect to the server).
If everything is done correctly, then the next window we will see a list of databases.

That's all for now. For more advanced use of HeidiSQL, read the instructions on the official website
