Loading local data is disabled
search cancel

Loading local data is disabled

book

Article ID: 392277

calendar_today

Updated On: 03-27-2025

Products

VMware Smart Assurance

Issue/Introduction

Below error is observed as local_infile is disabled in MnR.

WARNING  -- [2025-03-20 07:07:51 GMT] -- SqlStorageConnector::handleCommitError(): Error encountered while pushing file 'property_17424544707451562431130.mysql' into the table 'data_property' (retry #0)!
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Loading local data is disabled; this must be enabled on both the client and server sides

Environment

Watch4net/MnR - 7.x

Cause

MnR framework uses local_infile feature of MySQL to load data files between APG Backend and MySQL components. The local_infile parameter is having impact on these two modules in terms of data loading and data persistent. 

With MySQL 8.x.x., the local_infile parameter is disabled by default and is impacting the Backend module if not enabled as designed

Resolution

In 2 ways, local_infile can be enabled. 

From MySQL client:

  1. Login to MnR MySQL client and run 
    show global variables like 'local_infile';
  2. If output from Step 1 shows that local_infile is OFF then run below to enable same.
    SET GLOBAL local_infile=1;
  3. Run Step 1 again to ensure that local_infile is enabled. 

From MySQL config file:

  1. Take backup of my.cnf file available in <APG_BASE>/Databases/MySQL/Default.
  2. Open my.cnf, look for parameter local-infile.
  3. By default, value is set to 0, change it to 1.
  4. Save and close the file.
  5. Restart mysql service for changes to take effect as 
    ./manage-modules.sh service start mysql Default