安装“ laravel”错误无法找到驱动程序
安装laravel
错误找不到驱动程序
问题: laravel
的版本是5.8.38
php
的版本是7.4.3
mysql
的版本是8.0.21
时找不到
我获得错误在安装
laravel mysql数据库 已配置,数据已迁移到MySQL数据库。不应报告找不到驾驶员。
{
"message": "could not find driver (SQL: select * from `my_admin` where `mobile` = 18912345678 order by `id` asc limit 1)",
"exception": "Illuminate\\Database\\QueryException",
"file": "/home/ubuntu/ygd/api/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 664,
"trace": [
{
"file": "/home/ubuntu/ygd/api/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 624,
"function": "runQueryCallback",
"class": "Illuminate\\Database\\Connection",
"type": "->"
},
{
"file": "/home/ubuntu/ygd/api/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 333,
"function": "run",
"class": "Illuminate\\Database\\Connection",
"type": "->"
},
{
"file": "/home/ubuntu/ygd/api/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
"line": 2130,
"function": "select",
"class": "Illuminate\\Database\\Connection",
"type": "->"
}
...
]
}
Install laravel
error could not find driver
问题:
The version of laravel
is 5.8.38
The version of php
is 7.4.3
The version of mysql
is 8.0.21
I get the error could not find driver
when installing laravel
The mysql database has been configured, and the data has been migrated to the mysql database. It should not be reported that the driver cannot be found.
{
"message": "could not find driver (SQL: select * from `my_admin` where `mobile` = 18912345678 order by `id` asc limit 1)",
"exception": "Illuminate\\Database\\QueryException",
"file": "/home/ubuntu/ygd/api/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 664,
"trace": [
{
"file": "/home/ubuntu/ygd/api/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 624,
"function": "runQueryCallback",
"class": "Illuminate\\Database\\Connection",
"type": "->"
},
{
"file": "/home/ubuntu/ygd/api/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
"line": 333,
"function": "run",
"class": "Illuminate\\Database\\Connection",
"type": "->"
},
{
"file": "/home/ubuntu/ygd/api/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
"line": 2130,
"function": "select",
"class": "Illuminate\\Database\\Connection",
"type": "->"
}
...
]
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用
php -i | grep mysqlnd
检查是否启用了mysql
驱动程序,而不是php -m
其他关于PHP操作环境,如果它是本地开发环境
Homestead
在Windowsa Veaget
下建议使用MacOS下的服务器环境建议
lnmp
一键式安装程序包。You should use
php -i |grep mysqlnd
to check if themysql
driver is enabled, notphp -m
In addition, about the PHP operating environment, if it is a local development environment
homestead
is recommended under windowsvalet
is recommended under macOSThe server environment recommends
lnmp
one-click installation package