Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

488
Views
Cannot use MySQL LOAD DATA LOCAL infile to remote MySQL server

Currently, we are in the process of migrating a ColdFusion 2021 server environment. The old environment was built on CF2016 and MySQL 5.7. The new environment is CF2021 and MySQL 8.0.27. Also, we have split the CF server and the MySQL server, so they are 2 different servers at this point.

We have a function in the CF code which creates csv files (locally) and inserts into a table of the MySQL server.

The query is written like this:

LOAD DATA LOCAL infile 'local-path-to-file' into table op_customer_call_records_work
fields terminated by '|'
lines terminated by '\n'
(master_id,map_id,host_id,,..etc..,cdr_source)

When this attempts to insert, I get this error:

Executing Database Query. (Loading local data is disabled; this must be enabled on both the client and server sides)

I have already set this in the my.cnf:

[client]  
loose-local-infile=1

[mysql]
local-infile=1

[mysqld]
local-infile=1
secure-file-priv = ""

and restarted the MySQL server.

My assumption is the [client] tag in the my.cnf file is either incorrect or being ignored. Also, the CF datasource connector uses a java file called: 'mysql-connector-java-8.0.22.jar' if that helps.

Any help would be much appreciated! thanks

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The [client] section in the options file only applies to MySQL command-line clients like mysql, mysqldump, or mysqladmin. It does not apply to other client interfaces, APIs, or connectors. So it won't apply to ColdFusion.

You need to make the connector enable local-infile.

For example, if you use MySQL Connector/J to connect ColdFusion to MySQL Server, you would need to add the allowLoadLocalInfile option to the JDBC URL. See https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-connp-props-security.html

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!