MySQL Forums
Forum List  »  Connector/C++

Re: driver->connect() Segmentation Fault
Posted by: Andrew Valedsky
Date: March 16, 2017 06:06PM

Hi all.
Having the same problem, but Ivan's solution didn't works for me.
My test code is:

#include "mysql_driver.h"
int main()
{
sql::mysql::MySQL_Driver * MySQLDriver;
sql::Connection * MySQLConnection;
MySQLDriver = sql::mysql::get_mysql_driver_instance();
try
{
MySQLConnection = MySQLDriver->connect("tcp://127.0.0.1:3306/mydb", "root", "12345");
std::cout << "CONNECTED" << std::endl;
}
catch (sql::SQLException ex)
{
std::cout << "Can't connect to the database server, exception caused: " << ex.what() << std::endl;
}
return 0;
}

Compiled with GCC 5.1.1 on CentOS 7.3.1611 using mysql-connector-c++-1.1.8-linux-el7-x86-64 (also tried generic version).
Please, help me to figure ot what's wrong.

Options: ReplyQuote


Subject
Views
Written By
Posted
2406
December 18, 2016 06:49PM
1151
December 21, 2016 09:41AM
1056
December 21, 2016 05:27PM
Re: driver->connect() Segmentation Fault
1499
March 16, 2017 06:06PM


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.