Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

Driver::connect hangs (1 reply)

$
0
0
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.

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>