The client cannot resolve the DNS SRV record for the target host, so the MySQL connection fails before it is established.
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.
DNS SRV lookup failed with error : %d CR_DNS_SRV_LOOKUP_FAILED was added in 8.0.22.
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.
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.
.
The FQDN you supplied has no _mysql._tcp. SRV record in public or private DNS, so the resolver returns NXDOMAIN.
The client machine’s resolv.conf or equivalent misroutes DNS queries, causing timeouts or SERVFAIL responses during SRV lookup.
Corporate VPNs sometimes block UDP/TCP port 53 traffic to external DNS servers, preventing SRV record discovery.
Using mysql+srv:// when the infrastructure only exposes an A/AAAA record triggers unnecessary SRV lookup and the error.
.
No. The error occurs on the client before any attempt to reach the server. MySQL may be fully operational.
Yes. If your environment does not rely on SRV for failover, specify the host and port directly.
Yes. Error 2070 was added in MySQL 8.0.22. Older clients skip SRV lookup silently.
Galaxy flags DNS resolution failures instantly and lets you test alternate host:port pairs without leaving the editor, speeding up troubleshooting.