MySQL Forums
Forum List  »  Connector/C++

Load Data Local Infile with Connector/C++
Posted by: Carl Herbst
Date: June 28, 2018 03:26PM

I'm trying to execute a LOAD DATA LOCAL INFILE ... statement in an SQL statement using Connector/C++ (with MySQL 8 on Ubuntu with G++). I get an error: ERROR: CDK Error: The used command is not allowed with this MySQL version. I've specified loose-local-infile=1 and local-infile=1 for both client and server in the cnf files. My LOAD DATA LOCAL INFILE ... statement works fine in the mysql client, so I don't think there's anything wrong with the statement itself.

In the older C connector version, you can include a call to

mysql_options (&mysql, MYSQL_OPT_LOCAL_INFILE, 0)

which makes it possible to use the statement. Is there any way to set client/connection options in the Connector/C++? Should I roll back to using the C connector?

Any suggestions would be much appreciated.

Options: ReplyQuote


Subject
Views
Written By
Posted
Load Data Local Infile with Connector/C++
2116
June 28, 2018 03:26PM
825
September 19, 2018 09:09AM


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.