List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 2 2003 2:47am
Subject:Re: Mac OS X and database path
View as plain text  
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 <mysql-thread133763@stripped>
>>To unsubscribe, e-mail 
>><mysql-unsubscribe-bzuniga=entermation.com@stripped>
>>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 <mysql-thread133764@stripped>
>To unsubscribe, e-mail <mysql-unsubscribe-paul=snake.net@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Thread
Mac OS X and database pathBernardo Zuniga2 Mar
  • Re: Mac OS X and database pathPaul DuBois2 Mar
    • Re: Mac OS X and database pathBernardo Zuniga2 Mar
      • Re: Mac OS X and database pathPaul DuBois2 Mar
        • Re: Mac OS X and database pathBernardo Zuniga2 Mar