0
저는 Ubuntu (12.04)의 C++에서 MySQL 5.5 x64와 함께 Poco (1.5.2 ver)를 사용하고 있습니다.Poco를 사용하여 MySQL에 연결하지 못했습니다.
#include <iostream>
#include <Poco/Data/MySQL/MySQLException.h>
#include <Poco/Data/MySQL/Connector.h>
#include <Poco/Data/SessionFactory.h>
using namespace std;
int main()
{
Poco::Data::MySQL::Connector::registerConnector();
try
{
string chaine = "host=localhost;user=root;password=mypassword;";
Poco::Data::Session test(Poco::Data::SessionFactory::instance().create(Poco::Data::MySQL::Connector::KEY, chaine));
}
catch(Poco::Data::MySQL::MySQLException& e)
{
cout << "Error: " << e.what() << endl;
}
return 0;
}
을하지만 MySQLException가 :
이 코드와 MySQL로 연결을 시도
Error: MySQL
은 무엇을 의미 하는가은? 나를 도울 수있는 사람이 있습니까?
감사합니다.
편집 : 확인 버그가 나쁜 라이브러리 링크가 있었다 : p는 나는 내 첫 번째 메시지에서, 버그가 나쁜 라이브러리 링크이었다 말했듯이 나쁜 MySQL 버전 ^^
질문에 답해야합니다 (또는 삭제하십시오). –