ghost無法連接3306端口
老師:
? ? ? ?學(xué)生照您的demo在本地寫了個(gè)ghost。但在docker-compose up 后運(yùn)行始終存在如下錯(cuò)誤,請(qǐng)問老師該如何解決?
? ? ? ?
ghost-app_1? | [2022-12-01 14:06:32] INFO Ctrl+C to shut down
ghost-app_1? | [2022-12-01 14:06:32] INFO Ghost server started in 4.359s
ghost-app_1? | [2022-12-01 14:06:32] ERROR connect ECONNREFUSED 127.0.0.1:3306
ghost-app_1? |?
ghost-app_1? | connect ECONNREFUSED 127.0.0.1:3306
ghost-app_1? |?
ghost-app_1? | "Unknown database error"
ghost-app_1? |?
ghost-app_1? | Error ID:
ghost-app_1? |? ? ?500
ghost-app_1? |?
ghost-app_1? | Error Code:?
ghost-app_1? |? ? ?ECONNREFUSED
ghost-app_1? |?
ghost-app_1? | ----------------------------------------
ghost-app_1? |?
ghost-app_1? | Error: connect ECONNREFUSED 127.0.0.1:3306
ghost-app_1? |? ? ?at /var/lib/ghost/versions/5.24.2/node_modules/knex-migrator/lib/database.js:57:19
ghost-app_1? |? ? ?at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
ghost-app_1? |?
ghost-app_1? | [2022-12-01 14:06:32] WARN Ghost is shutting down
ghost-app_1? | [2022-12-01 14:06:32] WARN Ghost has shut down
ghost-app_1? | [2022-12-01 14:06:32] WARN Your site is now offline
ghost-app_1? | [2022-12-01 14:06:32] WARN Ghost was running for a few seconds
gh_ghost-app_1 exited with code 2