Topic: Connecting To MySQL Server Via SSH Tunnelling

Hi Dimity and Co.

My web hosting service that also allows multiple MySQL databases to be created has blocked direct remote access to these servers. This means that when using the MVD to create a new table for a project or when trying to access an old project or application, the standard MySQL pop-up login box will not connect and will show an error message.


According to their support knowledge base, they present a round about method to access their MySQL server via SSH tunnelling giving an example using PuTTY.


After searching on this forum to see if anyone else has run into this issue and if there are any solutions, I found the following post in the Russian sub-forum: http://myvisualdatabase.com/forum/viewt … 877#p32877


I followed this for my old project and although this works (in that it allows access to my MySQL DB data finally), there seems to be a significant issue with it.


The issue is that the normal MySQL connection login box seems to be displayed before the code in the main begin...end block of the application - which sets up the SSH tunnel by running external program (plink.exe); so an error is always raised on the first run of the application (which has to be closed and rerun).


On the second run onwards (until the plink program is terminated), the program runs as expected and wanted.
This means that the required supporting external plink program is (a) not started before the DB connection process, (b) having this external program running for the main MVD program to connect and run properly is a bit ugly and prone to accidental closure, and (c) this external program is left running after the main MVD program is closed. Which is not very tidy or acceptable looking at it from the security side of things.


This really needs to be looked at as a priority as this will affect more and more people, especially if your MVD program is expected to be used by others.


I hope this will by considered seriously with a suitable solution provided in a suitably short time frame.

I have attached a video of a screen capture that shows some of what I have described above to hopefully make things clearer. Regards. D.

Post's attachments

Attachment icon capture.mp4 1.51 mb, 331 downloads since 2019-10-22 

Dennis

Re: Connecting To MySQL Server Via SSH Tunnelling

Hello.


Sorry for delay.

Please download latest beta version 6.0
http://myvisualdatabase.com/download/my … _6beta.exe


I added new directives
{$MySQL run_script_before_connect}
{$SQLite run_script_before_connect} 


Just put directive
{$MySQL run_script_before_connect}
to any place of script, after that the main begin...end block will be execute before connection to MySQL server.

Dmitry.

Re: Connecting To MySQL Server Via SSH Tunnelling

Thanks Dmitry.
This improves the situation a a fair bit; however the main (and more important problem/issue is with the need to start the external program - plink - and have it running in an unsecure manner at the same time as the main MVD program).
I raised this is a round about way in my opening post - please refer to (b) and (c), as I was really hoping that something could be done to remove this external dependency completely; optimally this would integrate/internalise the SSH tunnelling into the MVD program directly maybe in the form of a new class or extra (or extended) standard MySQL DB login pop-up dialog or something like that.
Any chance of this being implemented in 6.x?

Dennis

Re: Connecting To MySQL Server Via SSH Tunnelling

Unfortunately I can't add it.

Dmitry.

Re: Connecting To MySQL Server Via SSH Tunnelling

mr_d wrote:

Any chance of this being implemented in 6.x?

MVD comes from Russia. More strict rules about encryption technology...