3 Votes Vote

error during Adding data through CSV file.

Posted by topdog 580 days ago Questions| csv error file All

while I am adding details in database through CSV file I am getting error- Access denied for user 'user'@'%' (using password: YES) . I have checked database username and password. even if I add product one by one(without csv) it is workin fine. It means my database connectivity is correct. Do I need to make some change in my database hosting accoun or some code error?

connect_db(); // MYSQL connection settings


    $sql="LOAD DATA 
    INFILE '$file_name' INTO TABLE tbl_product 
    IELDS TERMINATED BY \"\t\" 
    LINES TERMINATED BY \"\n\" 
    ( cat_id, pd_name, pd_description, pd_price, pd_qty, pd_image, pd_thumbnail, pd_date, pd_last_update, tax)";

Originally asked by: ppp on Stack Overflow

Discuss Bury


Who Voted for this Question