Results 1 to 7 of 7

Thread: Connect to remote MySQL database using SSH

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Connect to remote MySQL database using SSH

    Quote Originally Posted by _Dron_ View Post
    I dont know works it or not.
    The first step of debugging a multi layered problem is to debug its single layers.

    Quote Originally Posted by _Dron_ View Post
    I need to create SSH connection to database. HOW TO DO THIS?
    This is totally irrelevant until you have verified that the tunnel works.

    Cheers,
    _

  2. #2
    Join Date
    Jan 2015
    Location
    Russia, Moscow
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    1

    Default Re: Connect to remote MySQL database using SSH

    Even if it works - how to put data from QtDatabase object into SSH tunnel? Then, how to extract data from SSH tunnel and put it into QtDatabase object and after that fetch an answer?

    Have you ever written a SSH connection to remote db? If so, please show an example of your code.
    Thanks.

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Connect to remote MySQL database using SSH

    An SSH Tunnel is indistinguishable from the client and server perspective.

    The client connects to its side of the tunnel like it would connect to the server,
    The server gets connections from its side of the tunnel like it would from the clients.

    And the tunnel doesn't care what it is transporting. It just accepts connections one one end, creates a connection on the other end and then passes data back and forth.

    You can easily try this with a stand-alone SSH client that supports tunnels.

    Cheers,
    _

Similar Threads

  1. How to Connect to MySQL database
    By johnL in forum Newbie
    Replies: 12
    Last Post: 16th May 2015, 17:43
  2. Replies: 2
    Last Post: 16th April 2012, 14:42
  3. Replies: 3
    Last Post: 8th March 2011, 08:57
  4. Questions about connect to remote database
    By stmk in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2010, 11:02
  5. Replies: 2
    Last Post: 15th April 2010, 15:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.