Hi Milan,

The location you specified is the place where your tables are going to be 
stored. However I was talking about the location of the TXT file that would 
be used in the load of data.

As I said before, I placed the TXT file in the location you said but this is 
not the place mySQL will look for it if you don't specify a path.
I tried to place the txt file in the bin directory and it worked.

Conclusion: if you don't specify the path of the file, mySQL will look for 
it in the bin. This is the default path for mySQL.

Thanks anyway

Siomara

These are the results I got:

pet.txt is located at: C:\mysql\data\myDBFolder:

mysql> LOAD DATA LOCAL INFILE "pet.txt" INTO Table pet;
ERROR:
File 'pet.txt' not found (Errcode: 2)


pet.txt is located at: C:\mysql\bin:

mysql> LOAD DATA LOCAL INFILE "pet.txt" INTO Table pet;
Query OK, 8 rows affected (0.02 sec)
Records: 8  Deleted: 0  Skipped: 0  Warnings: 7

mysql> select * from pet;
+----------+--------+---------+------+------------+------------+
| name     | owner  | species | sex  | birth      | death      |
+----------+--------+---------+------+------------+------------+
| Fluffy   | Harold | cat     | f    | 1993-02-04 | NULL       |
| Claws    | Gwen   | cat     | m    | 1994-03-17 | NULL       |
| Buffy    | Harold | dog     | f    | 1989-05-13 | NULL       |
| Fang     | Benny  | dog     | m    | 1990-08-27 | NULL       |
| Bowser   | Diane  | dog     | m    | 1989-08-31 | 1995-07-29 |
| Chirpy   | Gwen   | bird    | f    | 1998-09-11 | NULL       |
| Whistler | Gwen   | bird    | NULL | 1997-12-09 | NULL       |
| Slim     | Benny  | snake   | m    | 1996-04-29 | NULL       |
+----------+--------+---------+------+------------+------------+
8 rows in set (0.00 sec)

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql>




>From: "Milan Kajnar" <[EMAIL PROTECTED]>
>To: "Siomara Pantarotto" <[EMAIL PROTECTED]>
>Subject: Re: Loading data with a txt file
>Date: Thu, 17 May 2001 08:14:14 +0200
>
>Where? Just in data drawer of mysql...
>
>In windows MySQLAdmin here: c:\mysql\data\YourDTB\ .....
>In Linux: /var/lib/mysql/YourDTB/...
>
>Bye,
>    Milan
>
>
>----- Original Message -----
>From: "Siomara Pantarotto" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, May 16, 2001 1:27 AM
>Subject: Loading data with a txt file
>
>
> > Hi all,
> >
> > I tried to load data into a table (using a txt file) by following the
> > example on chapter 9 (pg 9) and it did NOT work. Then I decided to 
>include
> > the path of the file and it worked fine.
> >
> > I got curious though. If you omit the path, where does mysql looks for 
>it?
> >
> > I placed the file into the folder of the database I created, but I see
>that
> > it's not there that mySQL looks for it. The manual does not say 
>anything.
> >
> > Does anybody know the answer for this question???
> >
> > Thanks
> >
> > Siomara
> > 
>_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at 
>http://www.hotmail.com.
> >
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to