MySQL Forums
Forum List  »  Connector/C++

CDK Error: unexpected message
Posted by: Joost Calon
Date: June 28, 2018 04:21AM

Hi there,

I am trying to use the C++ connector but every time I get the same error message:
"CDK Error: unexpected message"

I'm trying to connect to a MaiaDB web server. When I use C# with the .net connector it works, I had to set SslMode to None to make it work though. I also tried to set mysqlx::SessionOption::SSL_MODE to mysqlx::SSLMode::DISABLED but also no luck there. And ofcourse I tried to turn off my firewall, but this shouldn't be the problem since I was able to connect with C# .net and also the MySQL shell. Any suggestions or help?


#include "stdafx.h"
#include "database.h"
#include <mysqlx/xdevapi.h>
#include <exception>
#include <iostream>

void Database::connect()
mysqlx::Session mySession(mysqlx::SessionOption::HOST, "",
mysqlx::SessionOption::PORT, 3306,
mysqlx::SessionOption::USER, "user",
mysqlx::SessionOption::PWD, "password",
mysqlx::SessionOption::DB, "database");
catch (const mysqlx::Error &err)
std::cerr << err << std::endl;

About my setup:
Windows 10
Connector/C++ 8.0.11
Visual Studio 17 (version 15.7.4)

Options: ReplyQuote

Written By
CDK Error: unexpected message
June 28, 2018 04:21AM

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.