在 PHPmyadmin 中加载数据 INFILE
我在 PHPmyadmin 中运行以下命令:
LOAD DATA INFILE '/test3.csv' INTO TABLE temp_car FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES (recloc,divdept)
并且
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)
收到此错误:
#1045 - Access denied for user 'db_admin'@'%' (using password: YES)
我尝试将文件的权限更改为 777,并将包含的文件夹更改为 777。
有什么想法吗?我在使用 LOAD DATA INFILE 进行工作测试时遇到了麻烦
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
"出于安全原因,当读取位于服务器上的文本文件时,文件必须驻留在数据库目录中或者可供所有人读取。此外,要在服务器文件上使用 LOAD DATA INFILE,您必须具有 FILE 权限。”
"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."