【问题标题】:php artisan migrate giving me error in Lumenphp artisan migrate 给我 Lumen 错误
【发布时间】:2018-11-18 13:06:35
【问题描述】:

当我尝试在 Lumen 中迁移时,出现以下错误

Connection.php line 664:

  could not find driver (SQL: select * from information_schema.tables where t  
  able_schema = authors and table_name = migrations)                           

Connector.php line 68:

  could not find driver  

我在 ubuntu 16 上使用 apache2。

【问题讨论】:

  • 你使用什么样的数据库?
  • 我目前使用的MySQL数据库

标签: php lumen laravel-artisan migrate


【解决方案1】:

如果您使用MySQL 数据库,请确保您的pdo_mysql php 扩展已启用。

【讨论】:

  • 是的,已启用
【解决方案2】:

我通过更新 PHP 版本解决了我的问题。 我正在使用 php7.0 。 我将其更新为 php7.2 。 流明要求最低 php7.1。

我使用了以下命令

sudo apt-get install php7.2-mysql

php 工匠缓存:清除

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-08-03
    • 2020-11-27
    • 2016-05-14
    • 1970-01-01
    • 2020-10-23
    • 2018-08-04
    • 2016-10-14
    • 2017-10-25
    相关资源
    最近更新 更多