I have 2 more ghost installations running perfectly on the same server with different ports. The Database credentials are correct. Not sure what’s wrong.
-
What version of Ghost are you using? 5.51.1
-
What errors or information do you see in the console?
✖ Starting Ghost
One or more errors occurred.
1) ConfigError
Error detected in the production configuration.
Message: connect ECONNREFUSED ::1:3306
Configuration Key(s): database.connection.host / database.connection.port
Current Value(s): localhost / 3306
Help: Ensure that MySQL is installed and reachable. You can always re-run `ghost setup` to try again.
2) GhostError
Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306
Help: Unknown database error
Suggestion: journalctl -u ghost_mysite-com -n 50
Debug Information:
OS: Ubuntu, v20.04.6 LTS
Node Version: v18.16.0
Ghost Version: 5.46.0
Ghost-CLI Version: 1.24.0
Environment: production
Command: 'ghost setup'
Additional log info available in: /home/mysite/.ghost/logs/ghost-cli-debug-2023-06-14T02_55_43_976Z.log
Try running ghost doctor to check your system for known issues.
When I run ghost doctor
✔ Checking system Node.js version - found v18.16.0
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking system compatibility
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_mysite-com
? Sudo Password [hidden]
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v18.16.0
Here is the additional log:
Debug Information:
OS: Ubuntu, v20.04.6 LTS
Node Version: v18.16.0
Ghost Version: 5.46.0
Ghost-CLI Version: 1.24.0
Environment: production
Command: 'ghost setup'
Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306
Help: Unknown database error
Suggestion: journalctl -u ghost_mysite-com -n 50
Stack: Error: Ghost was able to start, but errored during boot with: connect ECONNREFUSED ::1:3306
at Server.<anonymous> (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:73:28)
at Object.onceWrapper (node:events:627:28)
at Server.emit (node:events:513:28)
at emitCloseNT (node:net:2135:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)