I have two VMs in vagrant.
My app is on the [web] VM (192.168.10.10). My db is on the [db] VM (192.168.10.11).
I deployed my app to the [web] VM and then from within the [web] VM, I want to run my migrations so it migrates to the [db] VM.
Essentially, I want to migrate from one VM to another (192.168.10.10 > 192.168.10.11)
I changed my database.php file so it has the right IP and I triple checked my [db] VM to make sure that the credentials match:
return array(
'connections' => array(
'mysql' => array(
'driver' => 'mysql',
'host' => '192.168.10.11',
'database' => 'demo',
'username' => 'demo',
'password' => 'demo',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
'auth' => array(
'driver' => 'mysql',
'host' => '192.168.10.11',
'database' => 'demo',
'username' => 'demo',
'password' => 'demo',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
),
);
When I run "php artisan migrate" from my [web] VM it errors out:
[PDOException]
SQLSTATE[HY000] [2002] Connection refused
migrate [--bench[="..."]] [--database[="..."]] [--force] [--path[="..."]] [--package[="..."]] [--pretend] [--seed]
Any idea what is happening to refuse the connection?
Thanks!