Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker 运行报错 #897

Open
q770857088 opened this issue Jan 9, 2023 · 1 comment
Open

docker 运行报错 #897

q770857088 opened this issue Jan 9, 2023 · 1 comment

Comments

@q770857088
Copy link

BUG描述
docker 安装 初始化报错
docker-compose exec delos node scripts/init
Unable to connect to the database: HostNotFoundError [SequelizeHostNotFoundError]: getaddrinfo ENOTFOUND mysql
at /app/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:127:19
at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:725:18)
at _drainQueueStep (/app/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/app/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/app/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/app/node_modules/bluebird/js/release/async.js:15:14)
复现步骤
docker-compose exec delos node scripts/init

期望结果

实际结果

截图

环境
centos7.9

  • 是否是自建服务器?如果为自建,请提供操作系统版本
  • 如果是前端错误,请提供浏览器版本
  • 其它可能帮助我们排查问题的环境信息

附加信息

@ziveni
Copy link

ziveni commented Feb 28, 2023

修改docker-compose.yml中mysql root用户密码配置

  MYSQL_ALLOW_EMPTY_PASSWORD: "true"
  MYSQL_DATABASE: "rap2"
  MYSQL_ROOT_PASSWORD: ""
  #MYSQL_USER: "root"
  #MYSQL_PASSWORD: ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants