Hi, load data infile tries to load data from specified directory on the server.
if your file is on the client, try LOAD DATA LOCAL and verify the parameter --enable-local-infile more details are in http://dev.mysql.com/doc/mysql/en/load-data-local.html about data on the web server. Nota bene : *********************** D:\>perror 13 OS error code 13: Permission denied You have an os permission eroor. Mathias Selon Chris <[EMAIL PROTECTED]>: > I have been using LOAD DATA INFILE to load an ASCII data file into my > database. The datafile is uploaded to the server temp area and the name of > the file is passed to LOAD DATA INFILE query like: > > LOAD DATA INFILE '/tmp/phpyxCoes' INTO TABLE LocationTEMPSR12 FIELDS > TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' > > I now want to load data using LOAD DATA INFILE from a data file located > within my http_public directory. I can create a path to the file from my > DOCUMENT_ROOT, however passing that path to LOAD DATA INFILE generates this > error: (NOTE: I set the file permissions to 777) > > Can't get stat of '/home/path_to_my_file/datafile.txt' (Errcode: 13) > > Now if I just create a query like: > > LOAD DATA INFILE 'datafile.txt' INTO TABLE LocationTEMPSR12 FIELDS > TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' > > I get this error > File './my_database_name/datafile.txt' not found (Errcode: 2) > > Which seems to tell me that LOAD DATA INFILE is looking for my data file in > a location that is outside my hosting account. I just have an account with a > shared hosting service provider. > > So how would I specify a path to a file that is outside the directory where > my database is located? > > OBSERVATION: It appears the tmp directory must be in the database path > because, files uploaded to the tmp dir can be loaded using LOAD DATA INFILE. > > Thanks for replies, > Chris > > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]