Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-05-2006, 12:13 AM   #1
LQ Newbie
Registered: Aug 2004
Posts: 24

Rep: Reputation: 15
Where to place mysql data files

I'm obviously a complete newbie to Linux but I wanted to move the mysql data files from the data directory on my windows machine to my linux box, I have samba set up so i can transfer them over but I can't find where to put them on the linux box, i tried locate mysql but even then i couldn't find the mysql/data directory
this will be an easy one to solve i'm sure!
Old 01-05-2006, 12:38 AM   #2
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Mine is in /var/lib/mysql; thought that that is the default as well after a new installation.

You can check the script that starts mysql; the data directory will probably be mentioned in there.
Old 01-05-2006, 12:46 AM   #3
LQ Newbie
Registered: Jul 2001
Posts: 19

Rep: Reputation: 0
personally, I would extract the data from MySQL and then re-insert it. I have never had any luck just placing the db files onto another box. I have always dumped the data and re-inserted it.

I havent a clue how to dump the data from a windows box (maybe use phpmyadmin), but I use something like this command in linux to make a backup:

/usr/bin/mysqldump -A -u root -p | /bin/gzip - > `date '+%m-%d-%y_filename.sql.gz'`

this will dump the complete DB and then gzip it for you with a date in the filename.

I would actually be interested in knowing how to move the frm, MYI and MYD files to another machine or at least get the data I needed from them.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I place mysql dbs in a folder that I define macmichael01 SUSE / openSUSE 5 06-28-2005 02:35 PM
Core Files all over the place! Boffy Linux - General 15 09-25-2004 05:01 AM
c header files in linux in place of header files in windows? harun_acs Programming 1 03-17-2004 03:24 AM
Wanted: A place to UL/DL kernel config files. FallGuy Mandriva 6 11-07-2003 04:38 PM
Where you place non deb files Kroenecker Debian 4 10-12-2003 11:55 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration