There were no errors and it listed a number of rows affected and a time. tried the command again and it said that the file already existed. The problem was the directory path that I was looking in. I couldn't see it in the GUI but in the terminal a find pointed me to the file. I wasn't able to figure out the directory right away but it is now clear. the path is /usr/local/mysql-2.23.55/data/[databasename]

thanks for the help.
Bernardo
On Saturday, March 1, 2003, at 09:47  PM, Paul DuBois wrote:

At 21:38 -0500 3/1/03, Bernardo Zuniga wrote:
Thank you Paul,

That helped to clear things up. My guess was that the book was wrong and the path was different for OS X. The command worked fine, but apparently the files were never created for some reason. I will try this again.

Well, the book can't give a specific path that will be correct for all systems. I'd guess the authors were showing what the path would be under certain conditions.

If the statement didn't produce an error message, then the file should
have been created.  Was there an error, or did the statement produce
a message indicating that it wrote a certain number of rows?


thanks for your help, Bernardo On Saturday, March 1, 2003, at 08:37 PM, Paul DuBois wrote:

At 19:46 -0500 3/1/03, Bernardo Zuniga wrote:
Hello,

I'm a bit confused about where the database is located in Mac OS X. I was following the instructions in O'Reilly's boot using and Managing MySQL ad got to the point where I tried to do a select and output to a file. The command I ran was as follows:

SELECT * INTO OUTFILE 'books.dat'
FIELDS TERMINATED BY ','
FROM BOOK;

The book states that a test.dat file will exist n my drive at /usr/local/var/test/test.dat , yet no such file can be found. I don't even have that directory. My directory structure goes as far as /usr/local/ - then there is mysql-2.23.55 and an alias (mysql) that points to that directory. Inside mysql-2.23.55, i have a tests directory and a data directory which i cannot get into at the moment. So is the book wrong, or is it different for OS X now.

The file will be written in the database directory for the default database,
given a statement as you've written it. That will be the file
/usr/local/var/test/books.dat (not test.dat) if the current database
is test and if the server's data directory is /usr/local/var/. On
Mac OS X, it's probably not. To find out where the database directory
actually is, go into mysql and issue this query:


SHOW VARIABLES LIKE 'datadir';

That will show you a pathname.  Your file will be in test/books.dat
under that.


Any help is appreciated, Thanks, Bernardo Zuniga


---------------------------------------------------------------------
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




---------------------------------------------------------------------
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


---------------------------------------------------------------------
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





---------------------------------------------------------------------
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