To make your own custom you'd want to find a decent and easy to use library (no dynamic libraries if possible) for accessing a MySQL database from your webserver.

What comes with the standard install of FPC?