MySQL数据库的通信问题,debian托管的Laravel应用程序
当我尝试从命令行进行迁移时,我在Debian服务器上托管了Laravel版本9应用程序,报告了驱动程序问题。我安装了PHP8-MYSQL驱动程序并成功地迁移。当我尝试与登录路线连接时,即使已经安装了
Imphuminate \ database \ queryException,也报告了相同的驱动程序问题,找不到驱动程序(sql:select * select * select * from usesuder
其中email
email
=
I have hosted a Laravel version 9 application on a Debian server, when I tried to do the migration from the command line, a driver problem was reported. I installed the PHP8-MySql driver and migrated successfully. When I tried to connect with the login route, the same driver problem was reported even though it was already installed
Illuminate\Database\QueryException could not find driver (SQL: select * from users
where email
= [email protected] limit 1)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许您没有正确安装PHP-MYSQL插件。重新安装:
sudo apt安装php-mysql
,MySQL可能仅在套接字模式下运行。如果是这样,您需要找到MySQL的套接字路径。 这可能会有所帮助。
一旦找到了套接字路径,您就需要在.env文件上定义套接字路径。这 :
Maybe you don't have the php-mysql plugin installed properly. Reinstall by :
sudo apt install php-mysql
Also, it maybe possible that mysql is running in socket mode only. If that is the case, you need to find MySql's socket path. This might help.
Once you've found the socket path, you need to define the socket path on your .env file like this :