【问题标题】:Problem with php artisan migrate- laravelphp artisan migrate-laravel 的问题
【发布时间】:2020-05-01 23:57:18
【问题描述】:

我正在尝试执行 php artisan 迁移,但出现此错误:

Illuminate\Database\QueryException : 找不到驱动程序(SQL: select * from information_schema.tables where table_schema = forge and table_name = migrations and table_type = 'BASE TABLE')

catch (Exception $e) {
664|             throw new QueryException(
665|                 $query, $this->prepareBindings($bindings), $e
666|             );
667|         }

我在 phpinfo pdo_mysqlpdo_pgsql 中有我在 Windows 上使用 MAMP。

是否有任何想法为什么我仍然会收到此错误?

【问题讨论】:

  • 是但没用
  • 搜索您的错误会发现许多重复项,您检查了吗?
  • 这能回答你的问题吗? Laravel: PDOException: could not find driver
  • 具体来说,用您的相关代码更新您的问题,请在此添加 .env 文件或 config/database.php

标签: php database laravel mamp


【解决方案1】:

抱歉迟到了,请运行此命令sudo apt-get install php7.4-mysql 不要忘记将php7.4-mysql更改为您安装的相应版本的php

【讨论】:

    猜你喜欢
    • 2016-08-09
    • 2016-05-14
    • 2016-11-24
    • 2016-10-14
    • 2020-10-23
    • 2018-08-04
    • 2017-04-06
    • 2016-07-07
    • 2015-10-11
    相关资源
    最近更新 更多