Except, Dougie seems have drunk his beer before posting and hence gives exactly the answer you did not want. That is, how to move all the mysql databases.
I suspect that it is not possible to move individual databases from what I have read. For example: http://etutorials.org/SQL/MySQL/Part+II ... Directory/
However, all is not lost. You could run more than one instance of MySql, each configured with it's own database location. Which can of course be different.
You will have to change the configuration of the second or third... instances to use different port number to listen on.
Or, perhaps, you could move the file(s) for a database out of the normal data directory to somewhere else and then create symbolic links in the data directory pointing to the new database files locations.
Do back up your data before messing with any of this, if it's important.
Memory in C++ is a leaky abstraction .