The following code correctly uploads .csv file in MySQL in WAMP Server, but it is not working on GoDaddy shared 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 any error message, just a white page. I am sure all the credentials are correct. There is not any connection issue. It looks like the query is not running at all.
Edit: After enabling error display I am getting this error message after loading the page:
The user update failed: Access denied for user 'theUser'@'localhost' (using password: YES)