Jump to content

data load infile -csv file: error 'user not authorized'


forTheDogs

Recommended Posts

Hi:  This is the code I am using to import a csv file into my mysql database:

 

LOAD DATA INFILE 'update1.csv'

INTO TABLE pedigrees

FIELDS TERMINATED BY ",";

 

The file is in my home directory on the server.

 

The permissions code is 755 for the csv file and I have all permissions for the database.

 

The message I am getting is user not authorized; using password - yes.

 

Do I need to add my database user name and password?  I am logged in with the id and password I use to log in to the website server, not the one I use for the database itself.

 

If this is what I need to do, what would the proper syntax be?  This is the first time I have attempted to work on my database from php on my host's server that I have received any message about passwords or user IDs or authorizations and I have been adding, deleting, editing tables and fields without problem.

 

Thanks so much!!

For security reasons' date=' when reading text files located on the server, the files must either reside in the database directory or be readable by all. Also, to use LOAD DATA INFILE on server files, you must have the FILE privilege. See Section 5.5.3, “Privileges Provided by MySQL”.[/quote']

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.