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

 

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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM