Dual booting linux and windows while sharing xampp web applications code and database

Ok here we go again, I am sitting here updating my Gentoo machine (I haven't done that for some time now) and it is taking much time compiling all those packages. I have recently started working on a Drupal project on my Windows machine using XAMPP and was thinking to myself what if I can use this time in completing the project instead of just siting their waiting for it to finish.

I have long accessed my NTFS partitions from Linux using ntfs-3g[1] and had a copy of Apache and MySQL running on my local machine so first thing was bring the project folder to my Linux Apache to do that:

1- Navigate to apache htdocs folder

  1. cd /var/www/localhost/htdocs

2- Create a symbolic link to the project folder
  1. ln -s /mnt/.../xampp/htdocs/<project folder>

3- Navigate to the url in browser and their it is the project but without a database (now i have to bring the database)
4- Go to the data folder of MySQL on Gentoo
  1. cd /var/lib/mysql

5- Create another symbolic link of the xampp database folder
  1. ln -s /mnt/.../xampp/mysql/data/<project database folder>

6- Last thing is to create a user with same username/password and grant it same permissions on the database.

And that's it. Now I have the same application and database and can work on them from the linux or xampp machine.

[1] NTFS-3g