This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-15. For the latest, interactive version please visit https://mariadb.com/kb/.

sharing one Database

Hi, I'm new to Linux, using Ubuntu, formerly Win 7. I've installed Linux on a separate HDD so I can decide by invoking the BIOS-Menue from which drive the PC starts. I often have to switch between those two systems.

I have a MySQL-Database on Windows and I want to share it which MariaSQL on Linux - that means I want to change data while driving Linux and have them when I'm back to windows. can Is this possible? How to work it out?

Answer Answered by Daniel Bartholomew in this comment.

I've never tried doing that before, but if your Windows drive is mounted when Linux is running you should be able to set the datadir variable in your my.cnf file on Linux to the path to the data dir on your Windows drive.

Since they would be using the same data dir, every change made when you are running Linux will be there when you boot to Windows, and vice-versa.

This won't work if you have them both running simultaneously, but if only one or the other operating system is running at a given time then it should work. But like I said, I've never tried it.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.