Laravel 找不到驱动程序(SQL:从信息_schema.tables中选择*,其中table_schema=fireflyiii和table_name=migrations)
我第一次使用部署一个名为的应用程序。我已经从上创建了一个服务器 我刚刚运行了docker compose exec firefly_iii_应用程序php artisan migrate--seed,这是构建过程中的一个步骤 但是,我遇到了某种连接错误:Laravel 找不到驱动程序(SQL:从信息_schema.tables中选择*,其中table_schema=fireflyiii和table_name=migrations),laravel,docker,Laravel,Docker,我第一次使用部署一个名为的应用程序。我已经从上创建了一个服务器 我刚刚运行了docker compose exec firefly_iii_应用程序php artisan migrate--seed,这是构建过程中的一个步骤 但是,我遇到了某种连接错误: In Connection.php line 664: could not find driver (SQL: select * from information_schema.tables where table_schema = fi
In Connection.php line 664:
could not find driver (SQL: select * from information_schema.tables where table_schema = fireflyiii and table_name = migrations)
In PDOConnection.php line 50:
could not find driver
In PDOConnection.php line 46:
could not find driver
我不明白为什么或者如何进一步调试它。根据政府的说法,这不是现阶段应该发生的事情
我在YAML文件中仔细检查了密码,以确认其正确性
你应该试试这个:
sudo apt get install php7.0-mysql此错误只是因为未建立mysql连接。
尝试编辑.env文件以确保使用正确的用户名、密码和数据库名称。这将解决您的问题。您正在使用Docker。由此:
Pulling firefly_iii_db (postgres:10)...
看起来您使用的是Postgres,而不是MySQL。发件人:
萤火虫三号。如果使用Postgres,请添加以下内容
命令的环境变量:DB_CONNECTION=pgsql
使用docker,您需要将
DB\u主机.env
文件从localhost切换到0.0.0.0
DB_HOST=0.0.0.0
我尝试了很多次,但都没有解决这个问题。谢谢你的建议。我也试过了,但没有解决问题。我注意到了这一点,除了我所有的配置文件都是MySQL。我没有修改任何东西来告诉它使用PostGres。但也许这是软件的一个缺陷。我会报告并确认的。谢谢