我第一次使用Docker来部署一个名为Firefly iii的Laravel应用程序。我已经从their official Docker image在Digital Ocean上创建了一个服务器。
我刚刚运行了docker-compose exec firefly_iii_app php artisan migrate --seed -构建过程中的一个步骤。
但是,我得到了某种连接错误:
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我不明白为什么或者如何进一步调试它。根据Firefly documentation的说法,这不是现阶段应该发生的事情。
我再次检查了YAML文件中的密码,以确认它是正确的。
https://gist.github.com/s3w47m88/e56431d58808180c9ff7e4ee962e03a6
发布于 2019-02-03 10:34:03
你应该试试这个: sudo apt-get install php7.0-mysql
发布于 2019-02-03 14:23:44
此错误只是因为未建立MySQL连接。尝试编辑.env文件,以确保使用了正确的用户名、密码和数据库名称。这将解决您的问题。
发布于 2019-02-05 04:53:43
您正在使用Docker。从这个开始:
Pulling firefly_iii_db (postgres:10)...看起来你使用的是Postgres而不是MySQL。来自Firefly III documentation about installation using Docker
萤火虫III假设MySQL。如果使用Postgres,请将以下环境变量添加到命令中: DB_CONNECTION=pgsql
https://stackoverflow.com/questions/54497695
复制相似问题