Error 502 Arduino YUN with PHP5 and MySQL

Not the firewall on the Yun. That needs only port 80 open. The firewall must be open on port 3306 on the MySQL server at Godaddy.