Shouldn't the newer question be marked duplicate instead of the older one ?
The choice can be arbitrary - the moderator (or, in fact, the flaggers) could feasibly consider the newer question (or its answer(s)) to be better, more complete, more relevant, or any number of other qualities. I have had many flags on SO and meta go the opposite way I would have expected, too.
I can't answer for Paul's choice in this specific case, it may have been based on these subjective factors, or perhaps depended solely on any flags that existed to cause him to look in the first place. We are humans, after all, and there may not be a lot of scrutiny into whether the original flag pointed the duplicate in the wrong direction - I will confess that in a lot of cases I have not felt the need to do that much analysis - if one or more user said x is a duplicate of y, I will often stop at the analysis of the content, and short of examining which question was posted first, which has the answer with the most up-votes, which one had bounties, which one was by a user I don't like, etc. I just don't put a high priority on those secondary attributes, sorry.
One question is about excluding tables and the other question about excluding databases. Should those be considered duplicate ?
Now that I would have a harder time answering, because I don't know MySQL well enough to know if they are questions that are "close enough" and could potentially be answered with the same solution. I also didn't investigate the other 8 answers on the older question to see if they use the same technique as the answer on the newer question; my research ended on happening to observe that there were 8 other answers in addition to yours.