Jump to content

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


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']
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.