Results 1 to 6 of 6

Thread: Can't connect to MySQL server on '192.xxx.x.x' (111) QMYSQL: Unable to connect

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2014
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Can't connect to MySQL server on '192.xxx.x.x' (111) QMYSQL: Unable to connect

    I am trying to sync two databases using a local IP. Though I have the QMYSQL driver installed properly it still gives an error for connection failed.
    A main database is created on host computer and I'm trying to sync data from another computer to this database through a local network.
    Code on host computer:
    Qt Code:
    1. QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL","Host");
    2. db.setHostName("HOSTIP");
    3. db.setDatabaseName("test");
    4. db.setUserName("root");
    5. db.setPassword("toor");
    To copy to clipboard, switch view to plain text mode 
    Code on other computer:
    Qt Code:
    1. QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL","Other");
    2. db.setHostName("IP OF HOST");
    3. db.setDatabaseName("test");
    4. db.setUserName("root");
    5. db.setPassword("toor");
    To copy to clipboard, switch view to plain text mode 
    Any help is appreciated!!
    Last edited by shawshank; 26th January 2014 at 07:02.

Similar Threads

  1. Replies: 15
    Last Post: 11th March 2014, 01:54
  2. Connect to the MYSQL server successful but can't see any data
    By stereoMatching in forum Qt Programming
    Replies: 1
    Last Post: 9th January 2014, 04:06
  3. Replies: 2
    Last Post: 16th April 2012, 13:42
  4. Replies: 1
    Last Post: 7th April 2012, 06:05
  5. Mysql unknown database, QMYSQL unable to connect
    By lixo1 in forum Qt Programming
    Replies: 3
    Last Post: 14th July 2010, 21:39

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.