Vultr DocsLatest Content

Associated Doc

How to Fix the "Connection Refused" Error When Connecting to a Vultr Managed Database

Updated on 15 September, 2025

Troubleshooting guide for resolving connection issues when attempting to access Vultr Managed Database services


reference slug: products/managed-database/postgresql reference slug: products/managed-database/valkey reference slug: products/managed-database/kafka

A Connection Refused error typically indicates that the client’s attempt to establish a TCP connection to the database server was blocked or rejected. This issue usually arises due to network-level restrictions, misconfigured connection parameters, or access control policies enforced by the managed service.

Connection Refused (Using Hostname)

Vultr Managed Database clusters provide a hostname that should be used in your connection string. This hostname is managed by Vultr’s DNS to always resolve to the current IP address and port of your cluster. Connecting via hostname is recommended because it:

  • Abstracts any underlying IP changes.
  • Avoids complications related to private network configurations.
  • Ensures the client targets the correct endpoint consistently.

For details on retrieving connection parameters, see the dedicated Connection Details guides for MySQL, PostgreSQL, Valkey, and Apache Kafka®.

Common Causes of Connection Refusal When Using Hostname

  • Incorrect Port Specification: Each cluster uses a unique custom port. Using the wrong port in your connection string will cause the connection to be refused.

  • Trusted Sources Configuration: By default, Vultr configures the Trusted Sources list to allow all incoming connections (0.0.0.0/0), so access is open unless modified. If you have restricted Trusted Sources, ensure your client’s IP or network range is included. Otherwise, connections will be blocked despite valid credentials. See the Trusted Sources documentation for MySQL, PostgreSQL, Valkey, and Apache Kafka® for details.

  • Virtual Private Cloud (VPC) Network Restrictions: When your cluster is connected to a VPC, network access is further restricted to resources within that VPC. Clients outside the VPC must use the public hostname and be permitted by Trusted Sources to connect. Resources inside the same VPC can use the private hostname for direct, secure connectivity. Ensure clients using the private hostname are in the same Vultr account, region, and VPC network to avoid connection refusals. Refer to the engine-specific VPC network guides for MySQL, PostgreSQL, Valkey, and Apache Kafka® for instructions on configuring network access.