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
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?

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

So i am using the wrong username/password you think? I can connect to the database with the given IP address, username and password. Never had this problem before. I'll talk to my client and see what they say.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.