Comment 14 for bug 1872541

Revision history for this message
Nicolay Giraldo (nicolay-g) wrote :

I found a workaround for C++ when I don't want to use certificates:

 sql::Driver *driver;
 sql::ConnectOptionsMap connection_properties;
 sql::Connection *con;

 connection_properties["hostName"] = host;
 connection_properties["userName"] = username;
 connection_properties["password"] = password;
 connection_properties["schema"] = dbname;
 connection_properties["port"] = port;
 connection_properties["OPT_RECONNECT"] = true;
 connection_properties["CLIENT_COMPRESS"] = true;
 connection_properties["OPT_SSL_MODE"] = sql::SSL_MODE_DISABLED;

 con = driver->connect(connection_properties);