I just solved a problem like this for myself. It turned out my Ubuntu mysql installation sets mysql to listen to only. When I changed the IP to the actual IP and opened the firewall (main FOG server), it worked as intended.

On Ubuntu, the config file in question is /etc/mysql/my.cnf, the setting is "bind-address = ".