[BUG] php bin/hyperf.php mine:install 安装失败
condyTao opened this issue · comments
新拉取的代码执行 php bin/hyperf.php mine:install 之后,无法安装、
出现以下错误:
Installation of local modules is about to begin...
SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = 'hyperf' and table_name = 'migrations')
Seed: setting_config_group_seeder
SQLSTATE[HY000] [2002] No such file or directory (SQL: truncate setting_config_group
)
"Setting" module install successfully
SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = 'hyperf' and table_name = 'migrations')
SQLSTATE[HY000] [2002] No such file or directory (SQL: truncate system_user
)
Thanks for opening your first issue here! Be sure to follow the issue template! 感谢您在这里反馈第一个问题!请务必遵循问题模板!
你解决了吗?我也遇到同样的问题了
我看log问题是出现在:/opt/www/vendor/hyperf/database/src/Connectors/Connector.php:107
猜测是没有读取到正确的数据库连接信息
我分享下我的做法:
- 进入mysql容器,创建数据库hyperf
- 复制.env.example 到 .env, 修改DB_HOST=mysql
DB_DATABASE=hyperf - 再去执行 安装命令就好了
先配置 env