Hello. I'm having a problem when connecting to a database in a remote server.
The error I get: "Can't connect to MySQL server on '...' (10061)"
The code:
When I ping the host it responds.
Works when I try with a local database.
User, password and database name are correct.
Any ideas?
The error I get: "Can't connect to MySQL server on '...' (10061)"
The code:
if (mysql_real_connect(sock, host, user, password, database, 0 , 0, 0))
cout << "ok" << endl << endl;
else
cout << mysql_error(sock) << endl;
When I ping the host it responds.
Works when I try with a local database.
User, password and database name are correct.
Any ideas?