Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

489
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda