MySQL LOAD DATA INFILE "not found (Errcode: 13 - Permission denied)"

This worked last week, and today it is not. I have not changed the php file. All I did in the span of time was to run apt-get update on my Ubuntu 15.04 server.

I have a MySQL statement:

LOAD DATA INFILE "/var/www/html/uploads/TitleList.csv" INTO TABLE tblLSITitleList FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY "\"" IGNORE 5 LINES;

This results in the following error:

File '/var/www/html/uploads/TitleList.csv' not found (Errcode: 13 - Permission denied)

I tried the following solution (that's how I solved this problem at the beginning of last week: LOAD DATA INFILE Error code: 13

I checked apparmor and the uploads folder is still there.

I also tried chmodding various resolutions, including 777, but nothing helps.

Any smart suggestions?

+4
source share
2

:

For security reasons, when reading text files located on the server, 
the files must either reside in the database directory or be 
readable by all

CSV , -

cp TitleList.csv /var/lib/mysql/yourdbname/TitleList.csv

LOAD DATA INFILE 'TitleList.csv' INTO etc ...
+2

CSV mysql, . SQL- SQL, LOCAL.

  • : LOAD DATA INFILE LOAD DATA LOCAL INFILE

cPanel phpmyadmin CSV using LOAD DATA, Use LOCAL keyword. .

CSV MySQL .

+1

All Articles