An error may occur when performing data subsetting or Synthetic Data Masking (SDM) for MySQL databases. No data will be inserted into the destination database when the following error is received.
Loading local data is disabled; this must be enabled on both the client and server side
In This Article
- Troubleshooting Options
- How to Manually Set to "True" from Command Line
- How to Explicitly Set to "True" in the Config.Properties File
Users can try one of the following:
- Manually set the "local_infile" option to "true" for the MySQL client and server within their configuration file (.ini. or .cnf).
- Manually set the "local_infile" option to "true" from the command line.
- Explicitly set the option to "true" within the config.properties file.
How to Manually Set to "True" from Command Line
- Log into the MySQL Server and set the Global local_infile option to "1".
SET GLOBAL local_infile=1;
mysql --local-infile=1 -u root -p
mysql> SET GLOBAL local_infile=1; Query OK, 0 rows affected (0.00 sec) mysql>quit bye mysql> mysql --local-infile=1 -u root -p
To test, rerun the G-Migration+ command and check the database to see if the data migration completes.
Use <Database Name>;
select * from <table name>;
If the option was set to "true" correctly, then the data should appear within the destination database. If not, try including the option in the configuration file(s), as discussed in the next section.
How to Explicitly Set to "True" in the Config.Properties File
To do this, users will need to add allowLoadLocalInfile=true to the url line in the config.properties file (as shown below):