In order to create a secure connection via SSH tunnel between MySQL Data Access Components (MyDAC) and MySQL, you should use the TMySSHIOHandler component. This component is an adapter between a database client and an SSH client. The secure connection can be used to transfer data through unprotected communication channels, like Internet.

The communication chart between database client and database server with use of TMySSHIOHandler is presented in the following diagram:

MySSHIOHandler

Data exchange between TMyConnection and TScSSHClient which plays as an SSH client is safe because it is carried out by calling methods of TMySSHIOHandler within the single application.

Connection between SSH server and MySQL server is not secure, therefore you should take care that it goes through secure communication channels.

 

Step-by-step setup of MySSHIOHandler

Place the TScSSHClient component onto the form and setup it to connect to the SSH server as described in the Client setup topic.
Place the TMySSHIOHandler component onto the form.
Select the TScSSHClient object in the Client property.
Place the TMyConnection component onto the form and setup it to connect to the MySQL server.
Assign the TMySSHIOHandler object to the IOHandler property of TMyConnection.
Connection to MySQL server by setting TMyConnection.Connected to True.

 

SecureBridge Components, Copyright © 2007-2024 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support