Bug #100956 loadig txt file using LOAD DATA local INFILE
Submitted: 25 Sep 2020 14:41 Modified: 29 Sep 2020 12:41
Reporter: Andrei Iacsiser Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:8.0.21 OS:Windows (Microsoft Windows 10 Home)
Assigned to: CPU Architecture:Other (i5)
Tags: WBBugReporter

[25 Sep 2020 14:41] Andrei Iacsiser
Description:
17:27:49	LOAD DATA local INFILE 'C:/Users/Andrei Mirela Emma/Documents/SQL/sql2sql3/SQL2/Countries.txt'   INTO TABLE countries   CHARSET latin1  
 FIELDS TERMINATED BY ',' 
 ENCLOSED BY '"' 
 LINES TERMINATED BY '\r\n'  
 IGNORE 1 LINES   

	Error Code: 2068. LOAD DATA LOCAL INFILE file request rejected due to restrictions on access.	0.016 sec

----[For better reports, please attach the log file after submitting. You can find it in C:\Users\Andrei Mirela Emma\AppData\Roaming\MySQL\Workbench\log\wb.log]

How to repeat:
any import behaves the same on my station, no successful imports yet. 

Suggested fix:
set global local_infile=1; --not a solution
[25 Sep 2020 15:02] Andrei Iacsiser
wb.log

Attachment: wb.log (application/octet-stream, text), 6.21 KiB.

[25 Sep 2020 19:33] MySQL Verification Team
Thank you for the bug report. Please provide the CREATE TABLE statement (You could see it with SHOW CREATE TABLE table_name) and a small txt file (attach it using the FILES tab) which is suitable to repeat the issue you are reporting. Thanks in advance.
[28 Sep 2020 9:59] Andrei Iacsiser
checks and load data trials

Attachment: load data.sql (application/octet-stream, text), 615 bytes.

[28 Sep 2020 12:57] Andrei Iacsiser
The bellow comment from bug Bug #91891 solved my problem, i could load .txt and see the results in the table.

[23 Sep 2019 17:00] MySQL Verification Team
Both the server and the client can restrict use of the LOCAL keyword for LOAD DATA and LOAD XML. The same error message is produced if either one blocks it.

To cause the server to permit access, set the local_infile variable. This can be done at runtime or at startup, as shown in the comments above.

To cause Workbench to permit access, edit the connection (click the wrench icon by the MySQL Connections, or right-click on a particular connection and choose Edit Connection...). On the Advanced tab, in the "Others:" box, add the line OPT_LOCAL_INFILE=1
[29 Sep 2020 12:41] MySQL Verification Team
Hello Andrei Iacsiser,

Thank you for confirming that issue is no longer seen.
Closing the report for now.

Regards,
Ashwini Patil