I read somewhere recently (here or proggit?) about libdrizzle, which is a BSD-licensed client library that is compatible with the MySQL network protocol. The developers are quite clear that you can use it with their own GPL 2 database server: https://answers.launchpad.net/drizzle/+faq/134