3948: Loading local data is disabled; this must be enabled on both the client and server sides
MySQLWhat does it mean?
You tried to load data from a client-side file with LOAD DATA LOCAL INFILE, but the feature is disabled on the client and/or server side. For security reasons LOCAL is disabled by default in MySQL 8.
Why does it happen?
The local_infile system variable is OFF on the server and/or the client driver has not enabled LOCAL INFILE. The feature is restricted by default because it can allow a malicious server to read client files.
How to fix it
If it is really needed, enable it on both sides: on the server SET GLOBAL local_infile = 1; on the client enable the driver's LOCAL INFILE flag (e.g. the allowLoadLocalInfile connection option / --local-infile=1). From a security standpoint, the preferred approach is to place the file on the server and use LOAD DATA INFILE without LOCAL, or use bulk INSERT/import tools. Disable local_infile again when you are done.
More from this engine
- 1194Table 'name' is marked as crashed and should be repaired
- 1615Prepared statement needs to be re-prepared
- 1553Cannot drop index needed in a foreign key constraint
- 1075Incorrect table definition; there can be only one auto column and it must be defined as a key
- 1055Expression not in GROUP BY (only_full_group_by)
- 1267Illegal mix of collations
- 1030Got error N from storage engine