When connecting to MySQL, I get an "Unknown Host" error.

ERROR 2005 (HY000): Unknown MySQL server host 'myqsl--do-user-example-0.db.ondigitalocean.com' (0)

An Unknown Host error occurs when:

  • You use the wrong DNS hostname.
  • There are underlying problems with DNS resolution.

If you are getting this error:

  • Verify that your hostname is correct.
  • Verify whether the machine you’re connecting from has problems with DNS resolution.
Check your network connection or revise your query.
Ensure your queries are not timing out and check your network connection.
Verify your login credentials and user permissions.