安装“ laravel”错误无法找到驱动程序

发布于 2025-02-06 09:36:17 字数 1484 浏览 1 评论 0原文

安装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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡淡的优雅 2025-02-13 09:36:20

您应该使用php -i | grep mysqlnd检查是否启用了mysql驱动程序,而不是php -m

其他关于PHP操作环境,如果它是本地开发环境

Homestead在Windows

a Veaget下建议使用MacOS下的

服务器环境建议lnmp一键式安装程序包。

You should use php -i |grep mysqlnd to check if the mysql driver is enabled, not php -m

In addition, about the PHP operating environment, if it is a local development environment

homestead is recommended under windows

valet is recommended under macOS

The server environment recommends lnmp one-click installation package

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文