I'm writing a database library in Java which is licensed under the GPLv3, and I want to include the MySQL JDBC driver in it, which is licensed under the GPLv2. Are there any restrictions stopping me from distributing the driver inside of my project? Should I include the license for it as well?
You cannot include GPLv2 software in a GPLv3 product, as the GPLv3 is incompatible with the GPLv2 as it introduces additional restrictions in the distribution of the software (e.g. the anti-Tivoization clause) which is forbidden by the GPLv2.
However, most GPL projects are licensed under "the GPL version X or (at your option) any later version". If this is the case for the code you're looking at, you can use that provision to include the code under the GPLv3. Note that this provision is not universal - most famously, Linux does not have this provision.
Now it gets complicated!
It seems that the MySQL JDBC Connector is licensed under the GPLv2 only - see e.g. this file so at first glance you cannot include this is in a GPLv3 program. However, Oracle also make the connector available under their Universal FOSS Exception, which allows the code to be used with any license approved by the FSF as a free license; the GPLv3 clearly falls into this category, so I think you can distribute it in a GPLv3 program. But I'm not a lawyer and Oracle are... not necessarily friendly to the open source community so please don't base anything on this answer without taking to a lawyer first.