mysql_config is for libmysqlclient only, it does not know that some server-internals specific header files may end up in a different path depending on what kind of mysql packages are used