Connection Timeout on remote DB connection
I am trying to use the c++ connector to connect to a remote db I am running on a virtual linux box. I keep getting this error:
CDK Error: Connection attempt to the server was aborted. Timeout of 10000 milliseconds was exceeded
This is my code:
#include <mysqlx/xdevapi.h>
#include <iostream>
int main()
{
try {
Session sess("db", 33060, "<user>", "<password>");
}
catch (const Error & err)
{
std::cout << "ERROR: " << err << std::endl;
}
catch (std::exception & ex)
{
std::cout << "STD EXCEPTION: " << ex.what() << std::endl;
}
catch (const char* ex)
{
std::cout << "EXCEPTION: " << ex << std::endl;
}
It works perfectly fine when I connect to localhost instance of mysql so I am not sure what the problem is. I can also connect to the remote db with mysql workbench so..?
Subject
Views
Written By
Posted
Connection Timeout on remote DB connection
3281
December 01, 2019 07:14AM
763
December 02, 2019 12:26PM
820
December 02, 2019 03:30PM
933
December 02, 2019 05:08PM
850
December 13, 2019 02:17PM
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.