Reputation: 64207
I need a single InnoDB database to be used by a Linux and a Windows MySQL installations (as I boot my PC to Linux or to Windows). Would be great if I could move the same database to a different PC. Importing/exporting data is hardly an option as the database is huge (over 4 GiB - easy to copy, but pretty long to export/import). How can this be achieved?
Upvotes: 2
Views: 3633
Reputation: 133
You should then install the MySQL database on the windows partition, and get the path to the database folder
In Linux, MySQL saves its data in "/var/lib/mysql/" so go there and create a symlink to the folder in the windows partition using the following command
ln -s /path/to/database/on/windows/ /var/lib/mysql/databasename
you need to be root to run this command, or use sudo.
This will make the MySQL server on both Operating systems see the same database folder.
NOTE: you should do some testing to check if this is a reliable solution, and if you are doing a mission critical project you should follow a more reliable setup.
Upvotes: 1