Using MySql Workbench 8 or above introduced this issue. This fixed it for me:
This restriction can be removed from MySQL Workbench 8.0 in the
following way. Edit the connection, on the Connection tab, go to the
‘Advanced’ sub-tab, and in the ‘Others:’ box add the line
‘OPT_LOCAL_INFILE=1’.This should allow a client using the Workbench to run LOAD DATA INFILE
as usual.
Quoted from this link:
https://bugs.mysql.com/bug.php?id=91872