首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >运行迁移时“无此类文件或目录”或“未知此类主机”

运行迁移时“无此类文件或目录”或“未知此类主机”
EN

Stack Overflow用户
提问于 2017-09-25 22:19:04
回答 5查看 52.7K关注 0票数 35

我从名为laravel的Laravel5.4数据库中删除了migrations表。当我运行php artisan migrate:install时,我得到这个错误:

代码语言:javascript
复制
[Illuminate\Database\QueryException]
SQLSTATE[HY000] [2002] No such file or directory
(SQL: select * from information_schema.tables where table_schema = laravel
    and table_name = migrations)

我删除并重新创建了数据库。我还运行了composer update。不走运。我可以在phpMyAdmin中运行该命令并手动创建表。

这个问题有时也会出现类似的2002年的错误:

代码语言:javascript
复制
[Illuminate\Database\QueryException]
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known.
(SQL: select * from information_schema.tables where table_schema = laravel
    and table_name = migrations and table_type = 'BASE TABLE')
代码语言:javascript
复制
[Illuminate\Database\QueryException]
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
(SQL: select * from information_schema.tables where table_schema = laravel
    and table_name = migrations and table_type = 'BASE TABLE')
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46407490

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档