How to Install DBD::mysql on Mac OSX Server 10.4.7 Universal part 2
NOTE: See previous entry about this here here
Interesting discovery which makes sense now:
I ran
mysql_config --cflags
and got:
-I/usr/include/mysql -fno-omit-frame-pointer -arch ppc64 -arch x86_64 -pipe
then ran:
mysql_config --libs
-arch ppc64 -arch x86_64 -pipe -L/usr/lib/mysql -lmysqlclient -lz -lm
Hmmm.... then I realized that mysql_config might be grabbing the wrong information since I'm NOT using Apples installed mysql version but rather a downloaded MySQL version 5 install.
When I changed to the correct install of mysql, the paths are now correct!
/usr/local/mysql/bin/mysql_config --cflags
-I/usr/local/mysql/include -Os -arch i386 -fno-common
/usr/local/mysql/bin/mysql_config --libs
-L/usr/local/mysql/lib -lmysqlclient -lz -lm
So I'm thinking the reason it installed fine with the standard non-Server version of OSX 10.4.7 is because there is no PREVIOUS install of MySQL on that version. The OSX Server version comes with mysql pre-installed but not running and it lives in /usr/bin/mysql. The download that I installed from mysql.com places it in /usr/local/mysql/ which is where it should be looking for --cflags and --libs but it isn't.
What to do?
I haven't tried this myself, but perhaps deleting the pre-installed version of mysql would help. I'm not sure where OSX keeps tabs of where all it's binaries are so I'm not sure how to update that part. If not you can always do it by hand in the previous post.
UPDATE: Read about how I updated DBD::MySQL to the latest version here.
Useful? Then Digg It.