How do I fix the "Connection Timed Out" error when connecting to my database?

A Connection Timed Out error occurs when the database’s firewall doesn’t allow you to connect to the database from your local machine or resource. This is usually because your machine isn’t included in your database’s trusted sources.

The open Trusted Sources section of the settings page

If you are getting this error, check that you have added the machine or resource you are connecting from to the database’s list of trusted sources. To check your database’s trusted sources, see the following guides for PostgreSQL, MySQL, Redis, MongoDB, Kafka, and OpenSearch.

Verify the connection string, ensure correct port usage, and add your local machine to the database cluster’s trusted sources.
Verify the format and values in the connection string for typos or formatting errors.
Prepend your database client command to the connection string.