Trying to debug an issue right now and having a hard time figuring out exactly what the error I'm getting from MySQL is.
The error is
Unknown MySQL server host 'db_host_name' (-2)
From the MySQL docs (https://dev.mysql.com/doc/mysql-errors/5.6/en/client-error-reference.html)
Error number: 2005; Symbol: CR_UNKNOWN_HOST;
Message: Unknown MySQL server host '%s' (%d)
This is not overly clear from the documentation what this error actually means, but based on my googling around it appears to be a DNS name resolution error, which is what I figured.
What I'm unclear on, is why there appears to be different numbers at the end. Online I've seen the name error with (0), (1), and (-2) like mine. The details of what this number means may be revealing to my underlying issue, but I just cannot find what this means anywhere, and the mysql documentation barely recognizes the existence of this number.
I found this question: What does the number in brackets at the end of SQLSTATE errors mean? but it was never answered.