I can only guess your mysql libraries are not located in a standard place.
If you want to keep your libraries in a non standard place, you should set the environment variable DYLD_LIBRARY_PATH
to point to your dynamic link libraries.
Under linux/most unices that would be LD_LIBRARY_PATH
.
So something like:
export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:./lib";
./yourExecHere
Should do the trick.