Link to home
Start Free TrialLog in
Avatar of petebern
petebern

asked on

Remotely connect to MySQL from C++

Hi,

Having problems connecting remotely to a mysql db from C++. I'm using MySQL++.

if (!mysql_real_connect(link,"IP ADDRESS","USERNAME","PASSWORD","DATABASE",0,NULL,0))
{
printf("UNABLE TO CONNECT\n");
}

If anyone has any sample code using MySQL++, C++, to connect to a remote server.

Is there anything special I need to know about remotely connecting?
I have enabled % wildcard. I am using the assigned Username, Password, and DB Name.

Any help is appreciated
Peter

ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of petebern
petebern

ASKER

Thank you, That worked fine.