3

Trying to install DBD::mysql on OS X Server 10.6 (mac mini server). But I'm missing the mysql headers apparently. Since mysql is already part of OS X Server 10.6, I would like to NOT install anything else (no fink or darwin ports installs), just whatever's needed to get DBD::mysql installed and working. Do you know how I could do that? Do I have to install the headers somewhere? And if so, where? (again: I don't want to install another version of mysql on the box, want to use the version it came with). Is there a way to install DBD::mysql without compiling any C files?

This is the error I get (the actual error is much longer, but these are the most meaningful bits, this is the first error reported).

Checking if your kit is complete...
Looks good
Unrecognized argument in LIBS ignored: '-pipe'
Note (probably harmless): No library found for -lmysqlclient
Multiple copies of Driver.xst found in: /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBI/ /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level/auto/DBI/ at Makefile.PL line 907
Using DBI 1.611 (for perl 5.010000 on darwin-thread-multi-2level) installed in /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBI/
Writing Makefile for DBD::mysql
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
gcc-4.2 -c  -I/Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBI -I/usr/include  -fno-omit-frame-pointer    -pipe   -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -Os   -DVERSION=\"4.014\" -DXS_VERSION=\"4.014\"  "-I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE"   dbdimp.c
In file included from dbdimp.c:20:
dbdimp.h:22:49: error: mysql.h: No such file or directory
dbdimp.h:23:45: error: mysqld_error.h: No such file or directory
dbdimp.h:25:49: error: errmsg.h: No such file or directory
Zoran Simic
  • 147
  • 1
  • 8

3 Answers3

4

For OSX 10.6.3, the binaries are here

http://www.opensource.apple.com/other/MySQL-53.binaries.tar.gz

  • This actually looks like it is what I'm looking for. The only slight (possible) problem is that I have v5.0.88 of mysql, while this is v5.0.82. The it installs is by overwriting what's on the hard drive in order to add the headers etc. Is this safe to do? Replace current 5.0.88 with 5.0.82 – Zoran Simic May 08 '10 at 19:23
  • This was it, I didn't notice you updated the link to MySQL-53 (instead of originally MySQL-49). Works great, this is 5.0.88, just like the mysql that comes with 10.6.3. Thanks a lot for the answer!! – Zoran Simic May 08 '10 at 19:42
  • For whoever has the same problem: instructions on how to untar this package are here: http://support.apple.com/kb/HT4006 (ellen, you should edit this response to specify this, instead of having it an another answer as currently). Did +1 for this answer, but someone has been modding your answers down for some reason... – Zoran Simic May 08 '10 at 20:06
2

Information on installing MySQL client binaries and headers for OSX 10.6:

http://support.apple.com/kb/HT4006

1

Hope this will help you "Install MySQL and DBD::MySQL on Mac OS X" and for the error please have a look at "Bug #28419"

Octopus
  • 191
  • 4
  • 11
  • mysql-devel RPM? On OS X? What are you talking about. I think what you need to install is one of the packages that make up XCode... the mysql headers should be there somewhere. But first, try a `mdfind "kMDItemFSName == 'mysql.h'"`, and if it produces any output, add -I/the/path/to/mysql.h/ into your CFLAGS (the path, not including mysql.h on the end). – Andrew McGregor May 07 '10 at 04:22
  • I did a similar installation on my OS X 10.6 client, but OS X server comes with mysql already installed, and I'd really want to stick to what's already there (I want to use the built in service management for mysql). Andrew, how can I go about adding the headers? I've installed Xcode (had to), but I don't see any option to check to get headers. The 'mdfind' you suggested doesn't produce any output. – Zoran Simic May 07 '10 at 05:42