JD,

> But..., wait..., I am now still in Linux and haven't gone to or tried
it
> in Windows [kind of allergic..., you know :)]. But, assuming the core
> datasource for Lin-Win is not different at all, I believe that in
> Windows it wouldn't be a big deal at all.

In fact. As I understand, Windows can access /home/myfiles/MySQL/ as
D:\MySQL\. So, after installing MySQL under Windows (doesn't even have
to be the same version as under Linux, though I would recommend this),
all you have to do is put the following entry in C:\WinNT\my.ini:

[mysqld]
datadir=d:/MySQL

You will have to move the database files there, of course. If you
installed MySQL with default settings, the databases will be in
C:\mysql\data\. Make sure the MySQL server is down when you move the
databases.

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  Geschäftsführer / CEO iConnect GmbH <http://iConnect.de>
  Heesestr. 6, 12169 Berlin (Germany)
  Tel: +49 30 7970948-0  Fax: +49 30 7970948-3

----- Original Message -----
From: "JD" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 01, 2003 5:18 AM
Subject: Making Lin/Win share DataSource


On Fri, 2003-01-31 at 06:39, Stefan Hinz, iConnect (Berlin) wrote:

Hallo Stefan,
Thanks for your kind reply. But anyway, me too,I've solved the problem
as well...:) :)

So, here is what I did in term of commands:

1- $ mount /home/myfiles
   [this /home/myfiles is the D:\ partition in my dual-boot laptop. I'm
now mounting it simply still as a normal user -- NOT as root]
2- $ mkdir /home/myfiles/MySQL
3- $ su
   [obvious..., accessing the root privilege]
4- $ mv /var/lib/mysql/* /home/myfiles/MySQL/
5- $ vi /etc/my.cnf
   [surely..., changing the datadir line to become and to look like:
datadir:/home/myfiles/MySQL/
6- $ safe_mysqld &

And all done!

The only "mistake" that I did earlier was that I as a normal-user
copied/moved the data to the vfat partition. This way, when I started
mysqld as root, I had no privilege at all over the datasource.

But..., wait..., I am now still in Linux and haven't gone to or tried it
in Windows [kind of allergic..., you know :)]. But, assuming the core
datasource for Lin-Win is not different at all, I believe that in
Windows it wouldn't be a big deal at all.

Nice! So now no matter I'm in Windows or Linux, my data can always be
intact...:)

BTW..., if one tries this way too, please inform the success/failure.


JD

--------------------
> JD,
>
> my answer may seem ridiculous, too, but with the following setup you
> should be able to use MySQL databases and tables both under Linux and
> Windows on the same machine.
>
> About the only thing you need is access to the MySQL data directory
from
> both Linux and Windows. Regardless of the operating system,
>
>  mysqladmin variables
>
> will show you where DATADIR is. Of course (though it may sound even
more
> ridiculous), you have to have MySQL installed both under Linux and
under
> Windows.
>
> Whether you've started mysqld or not, you can issue
>
>  mysqld --print-defaults
>
> to find out the location of DATADIR. However, this will not show you
> DATADIR if it's not in my.cnf / my.ini.
>
> Now, let's say DATADIR is in /var/lib/mysql/ under Linux, and under
> Windows this is c:\mysql\data\ (I'm not informed how paths will look
> like when you share them between OS's).
>
> In this case, you would edit /etc/my.cnf under Linux and fill in:
>
> [mysqld]
> datadir=/var/lib/mysql
>
> And, under Windows, this would be the following in c:\winnt\my.ini
> (assuming you boot Win NT/2000/XP):
>
> [mysqld]
> datadir=c:\mysql\data
>
> Now, I suggest you start the MySQL server (both OS's) as follows:
>
> shell> mysqld --standalone --console
>
> This will output a lot of start information, so you can find out
what's
> going wrong at startup.
>
> HTH,
> --
>   Stefan Hinz <[EMAIL PROTECTED]>
>   Geschäftsführer / CEO iConnect GmbH <http://iConnect.de>
>   Heesestr. 6, 12169 Berlin (Germany)
>   Tel: +49 30 7970948-0  Fax: +49 30 7970948-3
>
> ----- Original Message -----
> From: "JD" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
>
>
> > Hallo list,
> > this might sound ridiculous. But, because my computer is dual
booting
> > Linux/Windows, I'm looking for ways to put the datasource in windows
> > D:\
> > or vfat, so that the data can be shared mutually by the two OS. But
> > until now I still cannot do that.
> >
> > I have tried to:
> >    - change the owner to mysql;
> >    - change the /etc/my.cnf
> >
> > Well, does somebody out there do something like this already?
> >
> > Thank you.
> >
> >
> > JD
> >
> >
>
> ---------------------------------------------------------------------
> > 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