Common SQL Errors

MySQL Error 2070: CR_DNS_SRV_LOOKUP_FAILED – Full Fix & Prevention Guide

Galaxy Team
August 5, 2025

The client cannot resolve the DNS SRV record for the target host, so the MySQL connection fails before it is established.

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 2070 (CR_DNS_SRV_LOOKUP_FAILED)?

MySQL Error 2070: CR_DNS_SRV_LOOKUP_FAILED means the client could not resolve the DNS SRV record for your server host. Verify that the SRV record exists, fix local DNS configuration, or connect with a direct host:port pair to clear the error.

Error Highlights

Typical Error Message

DNS SRV lookup failed with error : %d CR_DNS_SRV_LOOKUP_FAILED was added in 8.0.22.

Error Type

Connection Error

Language

MySQL

Symbol

CR_DNS_SRV_LOOKUP_FAILED

Error Code

2070

SQL State

Explanation

Table of Contents

What does “DNS SRV lookup failed with error” mean?

MySQL clients from 8.0.22 onward automatically attempt a DNS SRV lookup when the server name is prefixed with the mysql+srv or mysqlx+srv scheme. If name resolution fails, the client raises error 2070 (CR_DNS_SRV_LOOKUP_FAILED) and terminates the handshake.

The failure happens on the client side before any packets reach the MySQL server. Because the error is client-level, server logs remain clean, making troubleshooting confusing.

Correcting DNS or bypassing SRV resolution immediately restores connectivity.

When does the error surface?

You see the error in mysql, mysqldump, MySQL Shell, or any application that uses libmysqlclient or Connector/C on 8.0.22+. It appears right after you issue the CONNECT command, for example via mysql ‑-host=mysql+srv://db.example.com.

The same condition appears in GUI editors such as Galaxy when the connection string contains the +srv scheme or the host relies on SRV redirection.

.

Common Causes

Missing SRV record

The FQDN you supplied has no _mysql._tcp. SRV record in public or private DNS, so the resolver returns NXDOMAIN.

Incorrect DNS resolver configuration

The client machine’s resolv.conf or equivalent misroutes DNS queries, causing timeouts or SERVFAIL responses during SRV lookup.

Firewall or VPN interference

Corporate VPNs sometimes block UDP/TCP port 53 traffic to external DNS servers, preventing SRV record discovery.

Wrong connection URI scheme

Using mysql+srv:// when the infrastructure only exposes an A/AAAA record triggers unnecessary SRV lookup and the error.

.

Related Errors

FAQs

Does this error mean MySQL is down?

No. The error occurs on the client before any attempt to reach the server. MySQL may be fully operational.

Can I ignore SRV records safely?

Yes. If your environment does not rely on SRV for failover, specify the host and port directly.

Is the error version-specific?

Yes. Error 2070 was added in MySQL 8.0.22. Older clients skip SRV lookup silently.

How does Galaxy help?

Galaxy flags DNS resolution failures instantly and lets you test alternate host:port pairs without leaving the editor, speeding up troubleshooting.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo