laravel中php artisan migrate
輸入
php artisan migrate
發(fā)現(xiàn)錯誤
?[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
網(wǎng)上找的答案,不知道對不 你可以試下
修改?database.php
'host'?=> env('DB_HOST',?'localhost') . ('homestead'?== gethostname() ??null?:?':33060'),
我是在Mac宿主機(jī)執(zhí)行的命令,所以需要指定映射的端口號:33060
如果你直接在homestead虛機(jī)中執(zhí)行是不用指定的,因?yàn)槟J(rèn)就是3306