Initially, I thought that getting MySQL to talk to Perl would be easy. In theory, you should just be able to get the packages that do the talking… and everything would just work. But, getting them to talk to each other under Mac OS 10.7 (Lion) has taken a while.
Here’s what I did to get it all up and running:
- Downloaded and installed MySQL.
- Downloaded and installed DBD-mysql.
- Added this line to my .bash_profile:
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
- Added this line to my httpd.conf:
SetEnv DYLD_LIBRARY_PATH /usr/local/mysql/lib/
- Restarted Apache.
Why was this so hard? 🙂