Access Mac localhost from within a VM on shared network

Discussion in 'General Questions' started by Jake10, Mar 25, 2022.

  1. Jake10

    Jake10 Bit Poster

    I am using Parallels Desktop with the vagrant provider to create headless VM environments to develop locally.

    I have run into an issue that I can't find the correct IP to connect to my machine's localhost where I have my databases stored on a mysql server.
    As a work around I have imported my databases directly into the VM, but it's not a great solution as if I lose the box, I lose the database along with it.
    Ideally I would be able to connect the mysql server running on my machine's localhost where I manage databases with a GUI.

    I'm using a shared network, and have run "ifconfig" from my machine, where I can see ""
    I can ping this address from both my mac and the VM itself, but trying to connect to mysql returns: "ERROR 2003 (HY000): Can't connect to MySQL server on '' (111)"

    Can anyone shed any more light on this or point me in a better direction?

Share This Page