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

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

猜你喜欢

转载自www.cnblogs.com/zouke1220/p/10831064.html