Page 1 of 1

problem locating a file with mysql

Posted: Tue Feb 27, 2007 6:30 pm
by aussie_clint
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


im trying to run this sript and its saying the file is not found
[quote]File '\home\computer\public_html\cw.csv' not found (Errcode: 2)[/quote]

from the web site of my hosting (http://www.mdwebhosting) it has the dirctory structor as:

[quote]
Path to User files The path to your user files on Hosting, Budget Hosting, Linux Reseller Hosting, eShops is /home/username/public_html (replace username with your hosting name)  
[/quote]


[syntax="sql"]
LOAD DATA LOCAL INFILE '/home/computer/public_html/cw.csv'
INTO TABLE `newprice list`
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
can someone let me know where im going rong

thanks[/quote]


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Tue Feb 27, 2007 10:20 pm
by volka
Looks like there is no such file on the webserver. Please post the relevant part of your php(?) script.

Posted: Tue Feb 27, 2007 11:12 pm
by aussie_clint

Code: Select all

LOAD DATA LOCAL INFILE '/home/computer/public_html/cw.csv' 
the file is there and they say im useing the right directory but its not working

Posted: Wed Feb 28, 2007 5:22 am
by volka
eh... I thought you post more code, not less than in the first post. You used

Code: Select all

tags, so I guess there's a php script surrounding the sql query?

Posted: Wed Feb 28, 2007 6:59 am
by aussie_clint
im just useing that code trough mysql query browser, and iv copied the csv file into the that directory on my server

Posted: Wed Feb 28, 2007 10:51 am
by mikeq
Just because their documentation says the location of your home directory does not mean it is correct.

They may have changed the server config and not updated their documentation, surely not :roll:

I would email the host and ask them.

Do you have shell access to the server?

What about permissions on the file. If the webserver user (thats what php myadmin will be running as) doesnt have read access to the file will it produce that error?

Try chmod 777 on your file to see if it works