The problem goes down to wrong DNS configuration.
MySQL client tries to connect to non-existing hostname 'invalid_hostname'. It expects to get error 2005, which means 'invalid_hostname' can't get resolved. But if it is resolved MySQL gets error 2003 (Can't connect to MySQL server).
Check $ host invalid_hostname
If the request is resolved - it is bad.
The problem goes down to wrong DNS configuration.
MySQL client tries to connect to non-existing hostname 'invalid_hostname'. It expects to
get error 2005, which means 'invalid_hostname' can't get resolved. But if it is resolved
MySQL gets error 2003 (Can't connect to MySQL server).
Check
$ host invalid_hostname
If the request is resolved - it is bad.