1

On my computer I have Ubuntu as well as Windows (woe me!) installed. I got my apache servers on both of them to share the document root on a FAT32 drive. Ok, no big deal. But now I want to achieve the same thing with my database server - sharing the data directory.

So, my question is: Has anybody here ever achieved this or knows some bullet-proof description how to do it?

1
  • In my opinion, dual booting is useless, unless there is a very good reason for doing it. I would be very careful with storing DB data on FAT32, because of the filesystem's limitations. Nov 13, 2009 at 8:38

5 Answers 5

0

This post may be useful for you: Sharing MYSQL tables between Ubuntu/Windows

1

Presuming you have a dual-boot arrangement, then, yes, you can have MySQL using the same database files, as the on-disk structure is identical.

You will need to read the configuration documentation very carefully, though, as it is easy to think you've pointed MySQL completely to a non-default directory, but something's been left behind.

You also need to be careful of the case of tables and files, as Windows can't handle two filenames in the same directory with different case of names. Your best bet is to understand the case-folding options for the Windows version, and to always always always use lowercase tablenames.

1

If your database is not large, then dump (to fat32 partition) and restore could be the way to go. If it is too large to do dump and restore in a reasonable time, you might want to consider running windows or linux unside of a vmware or something like that.

0

Why would you want to do that?

Even though someone else may give the answer - my suggestion is not to do this setup as lock and write access will be a nightmare.

Just run a server into one of the machine and have the other one send the db query to that one.

1
  • Guys, that doesn't work. The systems do not run parallel to each other (is that even possible?) - they're on one machine. Therefore no lock/write problems, either. I just want to share the same files and the database because I am sometimes developing on Ubuntu and sometimes on Windows.
    – Franz
    Nov 12, 2009 at 10:50
0

I don't see the point when all you need in either webapp instance only needs the connection string to access data.

The last thing I'd be doing is migrate my data to a file system that doesn't have journalling - NTFS or whatever Ubuntu is using (EXT3?) would be better.

Yes, the systems could run in parallel if you use VMs. And there aren't any other filesystem options - the only other option is to setup a file server (Windows folder share, or via SAMBA) but this requires having a 2nd computer to serve the files.

1
  • Thank you for the comment. Good point, I will use another filesystem. Also see my comment to the other answer below.
    – Franz
    Nov 12, 2009 at 10:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .