AFAIK, it is not trivial to get MySQL working with MinGW and in fact, current MySQL package is tested just with MSC compiler. MySQL does not ship libraries for MinGW.
In fact, this is an item on my ToDo list, but so far it was with low priority - moreover I am not sure how to deal with this problem. E.g. should we ship U++ with library for MySQL? Are we ALLOWED to do so?
I would be glag for any suggestion in this topic....