Honestly, if it's a one-off in that you're only really interested in ancestor, you should probably just use DBI mysql against one of the public GO mirrors:
There is also example SQL up for the various things you might try, which makes getting something working quickly rather easy, and you don't have to worry about keeping things up to date at your end:
Again, coming from a online database perspective, you might want to check out the libraries that are consumed by AmiGO. Either go-dev or gobo-dbic, depending on your use case:
You can also keep in mind that you can get direct help from the GO Consortium at:
They could probably put you into contact with one of their programmers if you're still having problems (hi!).