LM:
Vagrant 1.8.1
Laravel Homestead version 3.0.1
Problems:
- [PDOException] SQLSTATE[HY000] [2002] Can't connect to ...
- [PDOException] SQLSTATE[HY000] [2002] No connection could ... refused it.
- Refuse to connect to DB via Heidi
I've browsed many discussions and found some solutions for you. Feel free to post similar problems.
php.ini
for extension=php_pdo_mysql.dll
homestead.rb
and set ports for guest and host, same as in the my.cnf
accesed by sudo nano /etc/mysql/my.cnf
inside the box!database.php
(mine) leave default, you can add'port' => env('DB_PORT', 33060),
You need to change only .env
file in your root project (mine)vagrant reload
& vagrant provisions
I hope that this will help somebody, because I was quite mad!