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.

Andrew Moore
DigitalOcean Employee
DigitalOcean Employee badge
December 10, 2019
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

Hi, thanks a lot, got it!

Best

Rajkishore J
DigitalOcean Employee
DigitalOcean Employee badge
July 19, 2022

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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel