laravel中php artisan migrate
輸入
php artisan migrate
發現錯誤
?[Illuminate\Database\QueryException]? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from inform ?
? ation_schema.tables where table_schema = laravel54 and table_name = migrati ?
? ons)? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
求大神
2017-09-10
網上找的答案,不知道對不 你可以試下
修改?database.php
'host'?=> env('DB_HOST',?'localhost') . ('homestead'?== gethostname() ??null?:?':33060'),
我是在Mac宿主機執行的命令,所以需要指定映射的端口號:33060
如果你直接在homestead虛機中執行是不用指定的,因為默認就是3306