php - MySQL LOAD DATA INFILE "not found (Errcode: 13 - Permission denied)" -
last week working, , today isn't. have not changed php file. have done in interim run apt-get update on ubuntu 15.04 server.
the mysql statement have is:
load data infile "/var/www/html/uploads/titlelist.csv" table tbllsititlelist fields terminated "," optionally enclosed "\"" ignore 5 lines;
this gives following error:
file '/var/www/html/uploads/titlelist.csv' not found (errcode: 13 - permission denied)
i have tried following solution (which how solved exact problem last week: load data infile error code : 13
i have checked apparmor , uploads folder still there.
i have tried chmodding various permissions, including 777, nothing helps.
any clever suggestions?
from docs:
for security reasons, when reading text files located on server, files must either reside in database directory or readable
i recommend copying .csv file database directory, like
cp titlelist.csv /var/lib/mysql/yourdbname/titlelist.csv
and
load data infile 'titlelist.csv' etc ...
Comments
Post a Comment