MySQL Forums
Forum List  »  Connector/C++

Driver::connect hangs
Posted by: Greg Lewin
Date: May 25, 2012 07:43AM

I have successfully connected to a remote database, where access is dependent on my ip address.

When I try from a different ip address (eg, took my computer home), Driver::connect hangs. Obviously, I can get my ip address on the 'approved' list, but really, I want Driver::connect to return NULL or throw an exception when it can't connect, not hang.

Building with eclipse 3.7.0 on ubuntu 11.10
Looks like I'm using mysqlcppconn 5.1.1

snippet:

driver = get_driver_instance();
cout << "Driver address is: " << driver << endl;

con = driver->connect(<database ip>, <username>, <password>);//HANGS HERE
cout << "Connection address is: " << con << endl;


Again, it works fine if I have all the permissions.

Options: ReplyQuote


Subject
Views
Written By
Posted
Driver::connect hangs
2417
May 25, 2012 07:43AM
1234
May 25, 2012 07:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.