laravel执行数据库迁移的过程中出现Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Operation timed out (SQL: select * from information_schema.tables where table_schema = shop and table_name = migrations

向customers表添加字段phone

php artisan make:migration add_phone_to_customers_table

 

问题:

解决方法:

将DB_HOST配置项修改为:127.0.0.1

 

执行完数据库迁移后记得将该配置项改回来

posted @ 2019-05-08 12:06  邹柯  阅读(4040)  评论(0编辑  收藏  举报