Did you compile the dll as a 32-bit release? I guess that a 32-bit process and a 64-bit dll doesn't work.
Also did you add the mysql dll to the same directory as your compiled dll?

Maybe there is some useful information in this thread:
http://killtube.org/showthread.php?1...ll=1#post10967