Question

DO + Serverpilot, Accessing mysql database issues

Hi, I’m looking for assistance as this issue has got me beat!

OK, so i’m looking at setting up a basic droplet to run a Craft CMS site. I’ve set up quite a few of these in the past using Serverpilot. Everything works well.

Today I decided to try the LEMP stack on Ubuntu 16.04. Installed nicely, managed to get everything that I needed installed however I’m having issues with the database. I’ve created a new database, added a new user and granted all permissions to them. Check and can access that database via the terminal.

I use Sequel Pro on my local machine and I wanted to import my exported local database but I cannot for the life of me access the database. Just keeps saying it cannot connect. Finally managed to get into it using the SSH option and imported the local database. Then when Craft tries to connect to the database, it gives a ‘cannot connect’ error as well.

So after ages of trying, I decided to go back to a Serverpilot set up. Destroyed my droplet, recreated a basic Ubuntu one, then used Serverpilot to create the app and database. Same issue again, unable to access the database from Sequel Pro.

I cannot work out what is going wrong? In each case Ive attempted the commenting out the bind address, but again, nothing works. Any ideas before I lose what little hair i have left? Thanks!

Show comments

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.

anyone who uses serverpilot, please join to the unofficial slack discussion community hub, for sharing experiences about doing missing (premium) features in free plan 😉

http://serverpilot-slack.herokuapp.com/

So after ages of trying, I decided to go back to a Serverpilot set up. Destroyed my droplet, recreated a basic Ubuntu one, then used Serverpilot to create the app and database. Same issue again, unable to access the database from Sequel Pro.

I cannot work out what is going wrong? In each case Ive attempted the commenting out the bind address, but again, nothing works.

When using ServerPilot, to access the database remotely through Sequel Pro you should use the Sequel Pro option to tunnel through SSH. If you need to instead open up MySQL publicly rather than using an SSH tunnel, you’ll need to both reconfigure the MySQL bind address and open up the firewall to expose MySQL. There’s a bit more info here:

https://serverpilot.io/community/articles/connect-to-mysql-remotely.html

This comment has been deleted