Fixed "dead connections" that would kill the mysql server eventually

And a gofmt for the top bits

Woops always defer database.Close() kids.
Fixed req connection leak that would kill the mysql server eventually