Skip tests requiring MySQL if MySQL is not available

This will help package maintainers (e.g., Fedora guys) who want to run `make test` on their build server but do not have all the databases set up.