How to Create an Embedded System

The MySQL embedded server library is called libmysqld. This library contains everything you need to run MySQL within another application. To embed MySQL, in principle you just compile libmysqld and then link it into your application.

In this lesson you will go through the steps for compiling an example application. So that you can concentrate on the principles of embedding rather than be distracted by superfluous code, we'll write a simple application that runs a couple of queries and exits.

Recall from Day 13, “Using the C API,” that you created client applications that communicate with a MySQL server. You will do much the same today, although like Day 13, this lesson is aimed at the developer who already has ...

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.