Can't remote connect to MySQL

  • Posted on February 21, 2015
  • pixelbatAsked by pixelbat

I recently set up a new droplet to host some websites. Admittedly this is mostly all new too me as I’ve used exclusively shared hosting up until now. I installed Sentora (formerly Zpanel) to set up all my stuff through. Everything is working great, all the websites are just as they were when I had a shared hosting account.

One of my websites is for a Minecraft server. The Minecraft server is hosted elsewhere but needs to remotely connect to the database that the website uses to sync player data. However I’m getting “Could not connect to MySQL Server:Communications link failure” errors. I’m pretty sure everything is properly set up via Sentora, and also reflected on the Minecraft servers end. I’ve double and triple checked, and can’t seem to get it to work.

I tried a few things based on research like changing the bind-address to in the my.cnf, but it didn’t fix it.

Any feedback or ideas to resolve my issue would be much appreciated.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This issue is resolved. Turns out I needed to set my bind-address to my server’s IP.

Not quite sure I understand what you mean by DO host in mysql. I do have 2 users set up that have access to the db. One that Xenforo (forum install) uses locally, and the remote user for the Minecraft server.

Protocol=TCP, and I don’t see anything blocking the MySQL port.

You need to add a user for your DO host in mysql, research for it on MySQL documentation. also be sure mysql is running over TCP and not just Socks, and that there is not firewall rules blocking MySQL port.