libmariadb is a mysql client library that you can use in commercial projects, unlike libmysql which is GPL.
Check out the list of known bugs and limitations.
You can use it with the mysql binding instead of libmysql.