LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Where to place mysql data files (https://www.linuxquestions.org/questions/linux-newbie-8/where-to-place-mysql-data-files-399676/)

TaaDow 01-04-2006 11:13 PM

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!

Wim Sturkenboom 01-04-2006 11:38 PM

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.

cbe 01-04-2006 11:46 PM

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.


All times are GMT -5. The time now is 01:46 AM.