迁移时无法找到驱动程序

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了迁移时无法找到驱动程序相关的知识,希望对你有一定的参考价值。

我想通过php artisan migrate进行迁移,但是我收到一个错误:

In Connection.php line 664:

  could not find driver (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations)

In Connector.php line 67:
  could not find driver

我的环境文件设置:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
答案

你需要安装php-mysql驱动程序。

以上是关于迁移时无法找到驱动程序的主要内容,如果未能解决你的问题,请参考以下文章

无法找到迁移的 dpcpp 输出文件,并且 dpct 响应为“不需要迁移”

无法在 android TV Preferences 片段中找到提供者

执行迁移时,Npgsql无法找到NpgsqlException

迁移到 Qt5 时无法在子目录中找到头文件

无法找到包含 Intent 在片段中时的配置根

未找到 ID 的 Android 片段