Can I direct vagrant to use the MySQL on the host machine?

I have several instances that I would like to run through vagrant however even the smallest database is many gigs.  Is there any way to configure Sugar in vagrant to use the MySQL installed on the host?

  • OK, So the answer turned out to be simple although my route there was horrible.  The answer is NOT to put the data files from vagrants MySQL on the host machine, that works but it is unusably slow.  They answer is to simply point Sugar at the default gateway of the vagrant machine.

    Steps

    1. Install MySQL on your HOST machine and make sure you can log into it from localhost
    2. Start up the vagrant machine with vagrant up
    3. Log into the vagrant machine with vagrant ssh
    4. run netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10
    5. The IP address the above command outputs is your default gateway, just use that IP as the MySQL address (instead of localhost) in the setup screen for Sugar.