Jump to content

SQL Error: Access denied...


rondog

Recommended Posts

I am trying to use LOAD DATA INFILE to load CSV file. I am using this query:

LOAD DATA INFILE 'http://www.website.com/new/new_dec/store.csv' INTO TABLE ssp_dealers FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (customer, street1, street2, city, state, zip)

 

Its is throwing this error at me:

 

/* SQL Error: Access denied for user 'user'@'%' (using password: YES) */

 

I emailed support and they said I have every privilege except GRANT and told me to check my SQL statement. Is their something wrong with it??

Link to comment
https://forums.phpfreaks.com/topic/94747-sql-error-access-denied/
Share on other sites

Well I am using Heidi SQL to connect remotely with username and password..I can run querys through the query window..it just doesnt seem to let me do load data infile

 

cooldude:

what do u mean "they have a connection with an invalid username".

 

is 'they' the host or are you referring to me?

I did...this is the actual SQL command I used minus the website name

LOAD DATA INFILE 'http://www.website.com/new/new_dec/store.csv' INTO TABLE ssp_dealers FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (customer, street1, street2, city, state, zip)

ok ok i figured it out...

 

LOAD DATA LOCAL INFILE 'C:/Documents and Settings/dop.OCTIUM3G/Desktop/store.csv' INTO TABLE ssp_dealers FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (customer, street1, street2, city, state, zip)

 

I was thinking it was looking for a file locally on the server side...I point it to my computer path name and it loaded up..

 

the only thing in the last field where ZIP is it has the zip code like this: 92026[]

 

I cant make the character because its invisible, but basically its adding the line break as a character into the field..it looks like a block. Any reason its doing that? Im pretty sure I can use a while loop in PHP and update that field with only 5 characters cutting that line break off.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.