0

I have spent past 3 hours trying to find the solution to this but, I am doing all the suggestions, yet still nothing works. I have a database setup, I have a user with privileges setup with password. I am using the following code to import a .csv file into the table created. I am using the following:

LOAD DATA INFILE '_ARCHIVE_TABLE_.csv' INTO TABLE `2_archive` 
LINES TERMINATED BY '\n' (id, Date, IP, Type_of_Service, Name_of_Agency, 
Name_of_Broker, Email, Name_of_Seller, Street_address, Town, 
Style_or_color_of_house, Directions_to_property_, Full_address, lat,lon, 
Qty, date_completed, Location_of_Agency) 

SET Date = CURRENT_TIMESTAMP, date_completed =date;

When I submit this, I get the error "access denied for user 'uname@'localhost' (using password: YES)." Where am I supposed to add this information the above code, in order for it to know I have permissions? The version of phpmyadmin in use is 4.3.8, if that helps. I have been reading similar questions, googling, you name it for 5 hours...time to ask for help....please?!?

  • you have to do this operation using root user.else you have to set permission ```GRANT ALL ON *.* TO 'user'@'localhost'``` – Manoj Jadhav Dec 08 '17 at 05:02
  • 1
    Scrap the "help please" part, and detail your FILE_PRIV from `user`, as well as`tables_priv` and `columns_priv` tables. – mario Dec 08 '17 at 05:04
  • Check one of these: https://stackoverflow.com/questions/16649966/load-data-infile-gives-me-an-access-denied-permissions-error-how-else-can-i-imp https://stackoverflow.com/questions/1014724/mysql-permission-errors-with-load-data https://stackoverflow.com/questions/2221335/access-denied-for-load-data-infile-in-mysql/4162310 – ino Dec 08 '17 at 06:23
  • The user I am logged in as has full permissions, but I am doing this on a hosted site, not locally. I will check the privileges for the table and columns, but I am not the one who set this up, I am taking over for a client, so bare with me as I get acclimated with this system. I'll give this a look and try again now. Will let you know how it goes. – Kimberly Reali Dec 08 '17 at 23:15
  • ok, I have verified that the user has all permissions for file, table and columns, but it still get the same error. So, I tried to set permissions incase I missed something: GRANT USAGE ON *.* TO 'uname'@'localhost' IDENTIFIED BY PASSWORD 'userspassword'; and I still get "#1045 - Access denied for user 'uname'@'localhost' (using password: YES) " I don't understand what I am missing... where am I going wrong? – Kimberly Reali Dec 09 '17 at 01:54
  • I have also tried to use this at the database level "GRANT ALL ON database.* TO 'uname'@'localhost' and still I get "#1045 - Access denied for user 'uname'@'localhost' (using password: YES) ". I have verified this user has all permissions set. – Kimberly Reali Dec 09 '17 at 02:07

0 Answers0