MySQL Can’t get hostname for your address

Error No. 1042
Can’t get hostname for your address

That’s what I got greeted by today. Not sure why as I was connecting to a database that I use almost every day. You’d think it to be a DNS issue, but the url was already resolved to the IP. Anyway, if you get this error and you want to fix it, go to the following folder

C:\ProgramData\MySQL\MySQL Server 5.5\ (or whatever version of MySQL you have installed)

Just add skip-name-resolve option to the [mysqld] section of your my.cnf/my.ini and reboot your MySQL server. That fixed the issue for me.