forTheDogs Posted February 10, 2008 Share Posted February 10, 2008 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!! Quote Link to comment https://forums.phpfreaks.com/topic/90396-data-load-infile-csv-file-error-user-not-authorized/ Share on other sites More sharing options...
Barand Posted February 10, 2008 Share Posted February 10, 2008 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'] Quote Link to comment https://forums.phpfreaks.com/topic/90396-data-load-infile-csv-file-error-user-not-authorized/#findComment-463471 Share on other sites More sharing options...
forTheDogs Posted February 10, 2008 Author Share Posted February 10, 2008 Thanks but I granted myself all permissions when I set up the database and their are read permissions for the file I am trying to load [chmod 755]. Any other ideas? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/90396-data-load-infile-csv-file-error-user-not-authorized/#findComment-463483 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.