Report this

What is the reason for this report?

mysql connection problem

Posted on January 14, 2022

I try making a connection to my DO mysql cluster from an external server. I added the IP to trusted sources. when I try to connect I get a ‘can’t connect’ I tried from the cammandline also.

mysql -u doadmin -h db-mysql-sfo3-xxx-do-user-yyy-0.b.db.ondigitalocean.com -p -P25060
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on 'db-mysql-sfo3-xxx-do-user-yyy-0.b.db.ondigitalocean.com' (111)

I am stuck. Any help appreciated



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!

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.

Hi @ebonit,

For certain actions it’s necessary to use it with the sudo command, however you can to check this tutorial:

How to allow remote access to MySQL

Hope helps you, Sergio Turpín

Hi there,

It is possible that you need to open port 25060 for external TCP connections on the server that you are running the command from.

This would depend on the firewall and the network configuration that you are using.

Let me know how it goes! Best, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.