Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Using Dev Tools Locally... VirtualBox host

Setup: OSX, IDE Local WebServer is setup on a VM, CentOS, serving files from host share.

Goal: Be able to run Phalcon DevTools locally, to generate migrations

Problem: Config file sets 'host' => 'localhost' for the database connection (because the database is local to the VM/webserver). Thus, when running any Phalcon DevTools command from the host machine (OS X), which accesses DB (such as it does with migrations), it cannot make the connection to the database (localhost makes no sense from my HOST's terminal).

Is there a way to change the database connection parameters for DevTools only? So that, when telling DevTools to do something database related, it will properly connect to the remote host?

Thanks, Adam


If you will bind your MySQL instance to your VirtualBox host IP or bind it to listen on all interfaces, you can easily change your config IP address and it will work with your VM and local DevTools. Also you have to allow MySQL user to access via that IP or all IPs and properly configure your firewall if used.

Ah yes. Duh. That makes sense... I was overthinking it. Thank you!