PowerDNS, gmysql backend and Chicken and Egg Problem

Yesterday I had a hard time making PowerDNS (pdns) start working using gmysql backend. Like I figured out later, this was a «Chicken and Egg problem». To start working, pdns must connect to mysql, to send its queries. But mysql needs DNS to resolve pdns' ip in order to authenticate it.

To avoid such situations in future, i added skip-name-resolve into /etc/my.cnf and substituted all hostnames with corresponding ip's in mysq.user table and some config files.