access mysql in host from guest virtualbox

后端 未结 1 1048
你的背包
你的背包 2020-12-21 07:16

This is my scenario,

I have a Ubuntu 12.10 host and a win 7 guest installed in the virtual box. The Network is configured to be NAT in the virtual box. I have a mysq

相关标签:
1条回答
  • 2020-12-21 07:56

    Your external IP being static or not has no bearing to accessing a virtualized server on your LAN. Set VirtualBox to bridge mode.

    Simply determine your computer's DHCP-selected internal IP (usually 192.168.1.SOMETHING) and replace the last number with another that is less than 250. For example, if your computer was 192.168.1.6, 192.168.1.70 would work fine on the VM(pick a high number to void conflicts).

    Set it by using the control panel->adapter settings. Reboot the VM. Connect to MySQL at 192.168.1.70(or the address you picked earlier).

    Note: If your computer's address is in a different subnet (192.168.0.XXX, 10.XX.XX.XX, etc) change the last number and keep the first numbers the same as on the host.

    0 讨论(0)
提交回复
热议问题