If you run into errors about connecting to the server, you need to check if your server is running in the command line.

Error:

connect ECONNREFUSED 127.0.0.1:3306

If you're seeing this ECONNREFUSED error which refers to port 3306, this means that Ghost wasn't able to connect to your MySQL server.

To fix:

  1. Ensure the server is running with sudo service mysql start
  2. Test that the server is now running by typing mysql in the command line and checking the response
  3. If this error occurred after using ghost install, once resolved rerun the setup phase using ghost setup

This solution is for self-hosted developers using the supported Ghost install method using ghost-cli. If you're having problems with an unsupported custom install, check out the community forum.