MySQL applications can be written to use an embedded server. See
Section 17.1, “libmysqld, the Embedded MySQL Server Library”. To write such an application, you
must link it against the libmysqld library by
using the -lmysqld flag rather than linking it
against the libmysqlclient client library by
using the -lmysqlclient flag. However, the calls
to initialize and finalize the library are the same whether you
write a client application or one that uses the embedded server:
Call mysql_library_init() to initialize the
library and mysql_library_end() when you are
done with it. See Section 17.2.2, “C API Function Overview”.
mysql_library_init() and
mysql_library_end() are available as of MySQL
4.1.10. For earlier versions of MySQL 4.1, call
mysql_server_init() and
mysql_server_end() instead, which are
equivalent. (mysql_library_init() and
mysql_library_end() actually are
#define symbols that make them equivalent to
mysql_server_init() and
mysql_server_end(), but the names more clearly
indicate that they should be called when beginning and ending use
of a MySQL C API library no matter whether the application uses
libmysqlclient or
libmysqld.)

User Comments
Add your own comment.