in reply to DBI Installation Mac

First, I want to just check the obvious: MySQL is installed, right?

I've encountered this same error, but it was on a Linux machine. I followed this guy's advice and installed libmysqlclient-dev via aptitude.

There is a post on SO about installing this library on OS X. The most popular answer was installing MySQL with Homebrew: brew install mysql. Even if your computer came pre-installed with MySQL, it might be good to use a brewed version so you can re-install or update w/o breaking anything your system needs.

Replies are listed 'Best First'.
Re^2: DBI Installation Mac
by carlriz (Beadle) on Mar 31, 2014 at 15:48 UTC

    Yes, I have installed the module. The only issue I have is how to get the mysql_config file into my execution path... This is where I am at now: http://search.cpan.org/~capttofu/DBD-mysql-4.027/lib/DBD/mysql/INSTALL.pod#Mac_OS_X

      Hi. What exactly do you mean when you say "I have installed the module"? Which module are you referring to? Can you confirm that MySQL is installed on your machine by typing mysql in Terminal? Thanks.

        I followed these steps listed on this website: http://www.quicomm.com/apm_dbddbi.htm

        At step 3 of the tutorial listed on the site ("Install the Perl MySQL DBD module:"), I get the mysql_config error. But, I tried typing mysql into the terminal, and a 'command not found' is printed.

        For some reason, I cannot reply to your message below...there is no reply button. I was going to try Homebrew, as you suggested, but I have gone too far to turn back lol.

        However, I managed to get the mysql_config file working...I followed this exactly using Mysql binary from Oracle (mysql-5.6.17-osx10.7-x86): http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql/INSTALL.pod#Mac_OS_X

        Now, I get this error when I go to run my script:

        dyld: lazy symbol binding failed: Symbol not found: _mysql_init Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/ +DBD/mysql/mysql.bundle Expected in: flat namespace dyld: Symbol not found: _mysql_init Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/ +DBD/mysql/mysql.bundle Expected in: flat namespace Trace/BPT trap: 5

        Google tells me its a 32-bit 64-bit issue between perl and DBI. But, both are 64 bit (computer is intel core 2 duo 64 bit-->see http://support.apple.com/kb/ht3696 and, well, oracle says their binary is 64-bit)