If you have access to the configuration of the machine, you can do one of two things:
- Soft-link in the libraries into an appropriate path location. Or copy them outright. Your call.
- Try and mofify the dynamic loader config. Under Linux, this is /etc/ld.so.conf which is used by the ldconfig program.
- Possibly, put the LD_LIBRARY_PATH setting in your apachectl script as an 'export', such as:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/mysql"