Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Michael Larkin's Profile

GitHub User: mikelarkin

Site: http://fetchapp.com

Comments by Michael Larkin

Avatar

SOLUTION:

If you're using port forwarding, you can reference your "host" machine by it's regular network address (for example, 192.168.1.111). Incidentally, this is the requesting IP that is used when trying to connect to mySQL, so be sure to allow it in your "host" mySQL configuration.

If you're using Host-Only networking, your "host" is at x.x.x.1. for example, if you follow the default and set vagrant to use 33.33.33.10, then your "host" machine is at 33.33.33.1. You'll need to ensure that connections from the vagrant box IP are allowed for the user you're using.

Avatar

Instead of replicating my database in the VM, I'd prefer to connect to MySQL on my "host". I've been reading through the documentation, and while I see how to forward ports from "host" to "guest", I don't see how to do it in the other direction?

I read about the Host-only Networking, but I don't see where/how to set the host's IP?

Is this possible?