The following code correctly loads the CSV file into MySQL on the WAMP Server, but it does not work on shared GoDaddy hosting:
<?php $con = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }; $sql = "LOAD DATA INFILE 'Dis.csv' INTO TABLE `single-ecolo-dis-no-tbl` FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n' IGNORE 1 LINES;";
I am not getting an error message, just a white page. I am sure all credentials are correct. There is no connection problem. It seems that the request is not running at all.
Edit: After enabling the error display, I get this error message after loading the page:
Failed to update user: access denied for user 'theUser' @ 'localhost' (using password: YES)
source share