Mattermost, Inc.

Mysql server won't start, connection refused

For feature requests, please see: http://www.mattermost.org/feature-requests/.

For troubleshooting questions, please post in the following format:

Summary

I can’t connect to mysql server, connection refused on port 80

Steps to reproduce

I’m on Ubuntu 16.04.3 x64 through a virtual droplet on Digital Ocean hosting. I’ve installed today Discourse and nodeBB but this package is even harder then those two lol!

Expected behavior

When the mysql server starts, it doesn’t start listening on :8065.

Observed behavior

[2017/09/19 00:31:08 UTC] [INFO] Loaded system translations for ‘en’ from ‘/opt/mattermost/i18n/en.json’
[2017/09/19 00:31:08 UTC] [INFO] Current version is 4.2.0 (4.2.0/Wed Sep 13 22:25:30 UTC 2017/a5ce36d0882ae1b4b409a7b68233bf89591a5f95/38697f6cf2a9183e410e88acd13191390711d38f)
[2017/09/19 00:31:08 UTC] [INFO] Enterprise Enabled: true
[2017/09/19 00:31:08 UTC] [INFO] Current working directory is /opt/mattermost/bin
[2017/09/19 00:31:08 UTC] [INFO] Loaded config file from /opt/mattermost/config/config.json
[2017/09/19 00:31:08 UTC] [INFO] Able to write files to local storage.
[2017/09/19 00:31:08 UTC] [INFO] Server is initializing…
[2017/09/19 00:31:08 UTC] [INFO] Pinging SQL master database
[2017/09/19 00:31:08 UTC] [EROR] Failed to ping DB retrying in 10 seconds err=dial tcp 165.227.208.26:3306: getsockopt: connection refused

What steps have you tried so far in troubleshooting the problem? The error that you posted is pretty clear - MySql is not listening on 165.227.208.26:3306. Is the MySql daemon running? Is that the expected IP address? Could the daemon be configured to listen on a different port? How about firewalls? I’m not familiar with Digital Ocean, so you’ll likely have to refer to their documentation in order to confirm these things.