Im using Mac os x Yosemite 10.10. I installed the lastest laravel version 5.1. I set up Homestead and it has been running great. However, when I try to make a MySQL connection in my Laravel app, and am now experiencing errors when running php artisan migrate on my development machine. Following is the statement that I see when I run php artisan migrate.
[PDOException]
SQLSTATE[HY000] [2002] No such file or directory
How can I solve this problem? When I get into VM, mysql works fine. But I do not know how I can use php artisan migrate. Thank you in advance.
Hi. I have made the database that has the same name(users) with my create_users_table.php file. And I also have SQLite file named database.sqlite in storage folder... :(
As mentioned above, you might need to configure your .env file. To do this, you can simply copy/rename the .env.example to .env and set the appropriate values there.
Seen as you have only now edited your .env file; I'm assuming that you edited the database credentials manually in the database config file. Check to see if you need to revert back to the original env variables.