我正在寻找这个问题的解决方案,但我没有找到与我完全相同的解决方案。这是所有的错误消息:
照明\数据库\查询异常:找不到驱动程序(SQL: select * from information_schema.tables where table_schema = forge and table_name =迁移)
在SQL660| //如果在尝试运行查询时发生异常,我们将格式化错误661| //消息以包括与/mnt/c/xampp/htdocs/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664的绑定,这将使此异常成为662| //对开发人员更有帮助,而不仅仅是数据库的错误。663| catch (Exception $e) {
664|抛出新的QueryException( 665| $query,$this->prepareBindings($bindings),$e 666| );667| } 668|异常跟踪:
1 /mnt/c/xampp/htdocs/blog/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70::(“找不到驱动程序”)PDOException
2伪造“PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=forge",”,"",[]) /mnt/c/xampp/htdocs/blog/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
请使用参数-v查看更多详细信息。
我尝试在主题Laravel: Error [PDOException]: Could not Find Driver in PostgreSQL中创建sudo apt-get install php7.0-pgsql
和其他命令,但仍然不起作用。
发布于 2018-12-17 00:45:11
您需要安装pdo和mysql驱动程序
sudo apt-get install php{V}-mysql
sudo apt-get install pdo-mysql
将v替换为您的php版本。如果您使用PostgreSQL,请确保在config/database.php或.env文件中更改连接
https://stackoverflow.com/questions/53804230
复制相似问题