执行 PHP srtisan migrate 出现错误

90643@DESKTOP-692Q6CM MINGW64 ~/code/larabbs (master)
$ php artisan migrate

In Connection.php line 664:

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

In Connector.php line 67:

could not find driver

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 4

你没有使用推荐的环境Homestead
应该是缺少扩展了

$ sudo apt install php7.1-pdo php7.1-mysql 
5年前 评论

@英雄没有斗篷 我找到问题了,php7哪里没有打开extension=pdo_mysql的扩展,然后是.env文件里的数据库账号密码是按老师教程里写的
DB_DATABASE=larabbs
DB_USERNAME=homestead
DB_PASSWORD=secret
改为安装mysql时设置的默认即可
DB_DATABASE=larabbs
DB_USERNAME=root
DB_PASSWORD=root

5年前 评论

好像以前遇到过。这个是因为缺少PDO扩展。
在php.ini里面,去掉以下两行代码之前的分号(;)
extension=php_pdo_firebird.dll

extension=php_pdo_mysql.dll

4年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!