I am running the most recent version of WP-CLI on my mac. I do all WordPress development within Vagrant, but would like to run WP-CLI commands in the host machine. I have a domain alias from “dev.mysite.com” to the IP of my server so it can be accessed through my web browser through an HTTP request.
When trying to run a WP-CLI command, I get an “Error Establishing a Databse Connection” error mesage because it is trying to connect via “localhost” when it really should be “dev.mystie.com” or the Vagrant VM’s IP Address. Is there any way I can access my site through WP-CLI without having to SSH into the guest?