How to connect to MySQL Server using SSH key pairs

To backup MySQL Server via SQLBackupAndFTP, you have to establish a connection via TCP/IP. In other words, SQLBackupAndFTP connects to a database via port 3306.

However, access to a database port directly may not be possible due to some security reasons. By default, MySQL Server disallows database port sharing for external connections, as it is generally a bad practice.

Setting up MySQL Server port forwarding to your local SSH port can be done if the SSH connection is supported by the server where your database is located. With this configuration, SQLBackupAndFTP will work with its local port 3306, and the necessary data will be forwarded through the SSH tunnel to port 3306 where MySQL Server is located.

You have to know the following information to configure an SSH connection:
  • UserName and Password you use to connect to your databases
  • Information for SSH connection
In order to set an SSH connection, please specify “localhost” in the Server Name box, and enter the need port into the “port” box if it differs from the default value.
Enable the “Connect using SSH tunnel” option in “Advanced settings.”
In the “Hostname” box, specify your server’s network address where a database is located, for example,
Please keep value 22 in the “SSH port” box, and in the “Local mapped port” box, use your database’s port — 3306.
The last step is to specify the data to set a connection and if the test is successful save the settings. Now you can continue to configure your backup job.

Leave a Reply

Your email address will not be published. Required fields are marked *