Question

mysql connection problem

Posted January 14, 2022 138 views
MySQLClustering

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

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.

×
Submit an Answer
2 answers

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

by Mark Drake
Many websites and applications start off with their web server and database backend hosted on the same machine. With time, though, a setup like this can become cumbersome and difficult to scale. A common solution is to separate these functions by setting up a remote database, allowing the server...

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