Results 1 to 3 of 3

Thread: Acces to a remote mysql server

  1. #1
    Join Date
    Aug 2006
    Posts
    12
    Thanks
    1
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Lightbulb Acces to a remote mysql server

    i have a question if i have a LAN based on three computers and suppose computer1 has a mysql db and i want to access to it from computer2 all i have to do its put "computer1" against "localhost" on setHostName that´s all??

    i mean:

    my_connect->setHostName("computer1");

    against
    my_connect->setHostName("localHost");

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Acces to a remote mysql server

    Provided that "computer1" is a valid address resolvable through DNS (or other mechanism your network uses), then yes. But basicaly it should be safer to use an IP address of the remote box.

  3. #3
    Join Date
    Jan 2006
    Posts
    75
    Thanks
    3
    Thanked 5 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Acces to a remote mysql server

    Yes, using IP address is better since it do not need to resolve host-name. Also, remember to add firewall access of port 3306 in the computer that has MySQL server installed.

Similar Threads

  1. Qt 4.1.4 & Mysql 5 on Linux x64
    By bothapn in forum Installation and Deployment
    Replies: 7
    Last Post: 4th August 2006, 14:23
  2. Qt 4.1 OS on Windows & mysql
    By neeko in forum Installation and Deployment
    Replies: 10
    Last Post: 31st January 2006, 21:22
  3. synching client readings to server output
    By OnionRingOfDoom in forum Qt Programming
    Replies: 14
    Last Post: 28th January 2006, 19:15

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.