LOAD DATA LOCAL problem

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
jonleow
-


Joined: 29 Apr 2004
Posts: 48

PostPosted: Wed May 19, 2004 4:20 pm    Post subject: LOAD DATA LOCAL problem Reply with quote

i seem to have a problem with the load data local function.

- i have enable it by using this command: --local-infile[=1]
and i cant load a txt file ex.'pet.txt' into my table called pet. i always get this error : File 'pet.txt' not found (Errcode: 2)



is there anything with the coding above? is my code enabling the load data local wrong?
Back to top View user's profile Send private message MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri May 21, 2004 2:17 pm    Post subject: Re: LOAD DATA LOCAL problem Reply with quote

jonleow,

Can you please give us more information about the context of this error? What is the script/scripting language you're using?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
jonleow
-


Joined: 29 Apr 2004
Posts: 48

PostPosted: Fri May 21, 2004 3:28 pm    Post subject: Reply with quote

hi, i created a folder named database and another folder named mysql in my abyss web server dir. I read from the mysql manual that comes together with the download of mysql, that to insert a record into our database table (named 'pet' for my case), we can use the 'load data local' method. In the folder of mysql, there are several other sub folders and one of them is called 'data'. That is where my created database 'menagerie' is stored. So my menagerie database contain one table and that is pet. So i use this coding as described by the manual to load a txt file into it:

mysql> LOAD DATA LOCAL INFILE "pet.txt" INTO TABLE pet;
i got this error:

File 'pet.txt' not found (Errcode: 2)
Back to top View user's profile Send private message MSN Messenger
Moxxnixx
-


Joined: 21 Jun 2003
Posts: 1226
Location: Florida

PostPosted: Fri May 21, 2004 5:08 pm    Post subject: Reply with quote

jonleow,
When accessing MySQL, do you have FILE privileges?
The LOAD DATA INFILE statement requires this.
Back to top View user's profile Send private message Visit poster's website
jonleow
-


Joined: 29 Apr 2004
Posts: 48

PostPosted: Fri May 21, 2004 6:42 pm    Post subject: Reply with quote

how do i check whether i have it?
Back to top View user's profile Send private message MSN Messenger
Moxxnixx
-


Joined: 21 Jun 2003
Posts: 1226
Location: Florida

PostPosted: Fri May 21, 2004 7:49 pm    Post subject: Reply with quote

Easy way to grant privileges - If you have PHPMyAdmin installed, just click on privileges and
look at root user settings.

Alternative way to grant privileges - You must use the GRANT statement. Look here for more info:
http://mysqld.active-venture.com/GRANT.html
Back to top View user's profile Send private message Visit poster's website
jonleow
-


Joined: 29 Apr 2004
Posts: 48

PostPosted: Fri May 21, 2004 8:27 pm    Post subject: Reply with quote

hi MOXXNIXX , i think i will hold on to this problem first and learn the other features of sql. Thanks for the help offered.
Back to top View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group