Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Workbench Error Code 29: (Errcode13 -Permission denied)

Can anyone please let me know why I keep getting a permission denied error even though I am logged in as the admin? I am trying to load a text file into a table in mysql workbench.

use alpha;  
drop table raw_finance_data;  
create table raw_finance_data 
(  
    Company         varchar(256),  
    Profit_Center   varchar(256),  
    Year            varchar(256),  
    Scenario        varchar(256),  
    Account         varchar(256),  
    total           float  
);  

load data infile 'D:/Users/alpha/Documents/Excel/fin.txt' into table alpha.raw_finance_data FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';  

I keep getting the error below. I am in the database as the admin.

Error Code: 29. File 'D:\Users\alpha\Documents\Excel\fin.txt' not found (Errcode: 13 - Permission denied)
like image 245
Tokunbo Hiamang Avatar asked Apr 30 '14 15:04

Tokunbo Hiamang


1 Answers

If your file is local to your client machine then you need to include 'local' i.e.

load data local infile 'D:/Users/alpha/Documents/Excel/fin.txt' into table alpha.raw_finance_data FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
like image 132
Martin Wilson Avatar answered Nov 15 '22 07:11

Martin Wilson