Question

Connection timed out on MySQL Managed Database Cluster

Hi guys, we start up with a new Managed Database MySQL cluster but unfortunately we cant connect with any PHP tool AND also phpMyAdmin.

The config for the phpMyAdmin:

$cfg['Servers'][$i]['verbose'] = 'CLUSTER';
$cfg['Servers'][$i]['host'] = 'nottheprivatehost-0.db.ondigitalocean.com';
$cfg['Servers'][$i]['port'] = 3306;
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['ssl'] = true;

The system is running on default settings with one additional user and database. Here I performed already successfully the “GRANT ALL ON” command for the additional user and database. The user can connect with the mysql command via shell and see the database.

I looks like an firewall timeout, but there are no “trusted sourced” defined. Also the cluster has currently no tags (in case of Firewalls).

So finally, I can connect like this without any problem (also with my own created user and database:

mysql -u doadmin -dPASSWORD -h nottheprivatehost-0.db.ondigitalocean.com -P 25060 -D defaultdb

But from other droplets it’s no chance (phpMyAdmin, PHP test, WordPress). I’ve also check the outbound firewall settings of this droplet. It also works.

Thanks a lot for your help! :) Best


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.

Accepted Answer

Failed with; $cfg['Servers'][$i]['port'] = 3306;

Success with; -P 25060

You’re simply using the wrong port in your application. Try changing it to the latter and retry connection.

BR

A

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.

Hi, thanks a lot, got it!

Best

Hi,

Our below community article can guide you in setting up and connecting to MySQL Managed database via phpMyAdmin with SSL.

https://www.digitalocean.com/community/tutorials/how-to-connect-to-mysql-managed-database-via-phpmyadmin

I hope this helps!

Regards, Rajkishore