I uploaded a project by FTP to a 1and1 server. I got an error when the website goes to the function that imports a csv file into a table of the database.
Here's my code:
$file = "/Contenu/BD/file.csv";
$sql = "LOAD DATA INFILE '$file' INTO TABLE table CHARACTER SET UTF8 FIELDS TERMINATED BY \";\" LINES TERMINATED BY \"#\"";
When I use "LOAD DATA INFILE
", I have a SQL error saying :
" SQLSTATE[28000]: Invalid authorization specification:
1045 Access denied for user xxxxxx (using password: YES) "
And when I use LOAD DATA LOCAL INFILE
, I have no SQL errors, but the integration doesn't work.
So I came to you to understand what is happening with my file importation. This file imports correctly in my development environment, in localhost, but not on the production server.
(the whole database works on the project so I don't think that I have errors on my SQL logins)
Thank you guys for your answers.