Host: MacOS 10.12 running MySQl server
Guest: Ubuntu 16.0.4 LTS
Problem: From Ubuntu as Guest, I cannot access my MySQL server running on the iMac host.
I really have tried many options with various Virtualbox network cards and settings. From the guest, I can access the Internet but not my MySQL server on the host. I've tried many port forwarding options, but nothing seems to work.
Could someone perhaps give me a suggestion on how to set this up? A clear example would truly be appreciated. Thanks!!
How to access MySQL server running on MacOS host
-
socratis
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: How to access MySQL server running on MacOS host
Here's a summary of the different network modes in VirtualBox:
[pre]+-----------+-------------+-------------+----------------+----------------+
| | VM <-> Host | VM1 <-> VM2 | VM -> Internet | VM <- Internet |
+-----------+-------------+-------------+----------------+----------------+
| HostOnly | Yes | Yes | No | No |
| Internal | No | Yes | No | No |
| Bridged | Yes | Yes | Yes | Yes |
| NAT | No | No | Yes | Port forward |
| NATService| No | Yes | Yes | Port forward |
+-----------+-------------+-------------+----------------+----------------+[/pre]
You need to use the HostOnly mode (which allows connections between the guest and the host ONLY), or the Bridged mode, which makes the VM just like another computer on your network. More information, ch. 6. Virtual networking. And remember, you can always have more than one network card in your guest to cover multiple scenarios.
| | VM <-> Host | VM1 <-> VM2 | VM -> Internet | VM <- Internet |
+-----------+-------------+-------------+----------------+----------------+
| HostOnly | Yes | Yes | No | No |
| Internal | No | Yes | No | No |
| Bridged | Yes | Yes | Yes | Yes |
| NAT | No | No | Yes | Port forward |
| NATService| No | Yes | Yes | Port forward |
+-----------+-------------+-------------+----------------+----------------+[/pre]
You need to use the HostOnly mode (which allows connections between the guest and the host ONLY), or the Bridged mode, which makes the VM just like another computer on your network. More information, ch. 6. Virtual networking. And remember, you can always have more than one network card in your guest to cover multiple scenarios.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Re: How to access MySQL server running on MacOS host
Thank you very much Socratis! That chart was very helpful. I’m a happy VB’er now!!