LOAD DATA INFILE within PHPmyadmin

时光总嘲笑我的痴心妄想 提交于 2019-12-13 02:13:38

问题


I'm running the following command within PHPmyadmin:

LOAD DATA INFILE '/test3.csv' INTO TABLE temp_car FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES (recloc,divdept)

AND

LOAD DATA INFILE '/var/www/vhosts/domain.com/httpdocs/admin/server/test3.csv' INTO TABLE temp_car FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES (recloc,divdept)

i get this error:

#1045 - Access denied for user 'db_admin'@'%' (using password: YES) 

I've tried changing the permissions to the file to 777 and the containing folder to 777.

Any ideas? I'm having a terrible time getting a working test with LOAD DATA INFILE


回答1:


"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. Also, to use LOAD DATA INFILE on server files, you must have the FILE privilege."



来源:https://stackoverflow.com/questions/4443352/load-data-infile-within-phpmyadmin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!