Vultr DocsLatest Content

Associated Doc

How to Fix the "Unknown host" Error When Connecting to MySQL?

Updated on 15 September, 2025

Troubleshooting guide for resolving MySQL connection errors when the client cannot resolve the database hostname.


The following error occurs when the MySQL client cannot resolve the database hostname:

ERROR 2005 (HY000): Unknown MySQL server host 'mysql-example.vultrdb.com' (0)

This typically happens when the hostname is incorrect or when DNS resolution fails.

Verify that you are using the correct hostname and port from the Connection Details section on your database’s Overview page. Then, connect to MySQL using:

console
$ mysql --host="<hostname>" --port=<port> --user="<username>" -p

If the hostname is correct but you still receive the error, check your system’s DNS configuration, ensure you have a working internet connection, and confirm that no firewall or network policy is blocking outbound connections on the specified port.