dbTalk Databases Forums  

Re: What file or directory is mysql data stored in?

comp.databases.mysql comp.databases.mysql


Discuss Re: What file or directory is mysql data stored in? in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Re: What file or directory is mysql data stored in? - 07-31-2006 , 05:28 PM






Quote:
I have my web server on a os/x box. I know enough Mac & unix to be
dangerous.

Not sure where the issue started, but mysql stopped working. I
reinstalled with the Mac Package. However now my database is empty.

So I know now the directory where mysql is installed - but where is
the data? What would the filename be? Essentially I want to get my
data out of whatever directory it's in and put it in my new install of
mysql.

I hope I'm going at this the right way...
You should use mysqldump to dump data from an old version and the
mysql command-line client to restore it to a new version. You didn't
say anything about the old and new versions of MySQL being different,
or not, or whether you were using InnoDB tables.

For MyISAM tables, generally the file names are of the form:

$datadir/$databasename/$tablename.{frm,MYI,MYD}

where $datadir is a constant for the particular installation
(/var/db/mysql in the FreeBSD MySQL port).


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.