libmysqlclient is indeed GPLv2 and you either need to GPL your code that calls this library, or buy a commercial license from Oracle.
However, if use ODBC instead you can write your application to the ODBC API which is NOT GPL. Your customers can then choose to install the MySQL ODBC Driver or any other driver.